IF(APPLE)
INCLUDE_DIRECTORIES(/opt/local/include)
LINK_DIRECTORIES(/opt/local/lib)
+ SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -undefined dynamic_lookup")
ENDIF()
-IF(APPLE)
- SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -undefined dynamic_lookup")
-ENDIF(APPLE)
-
IF(NOT LUAPATH)
EXECUTE_PROCESS(
COMMAND lua -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,1) == \"/\" then print(k) break end end"
OUTPUT_STRIP_TRAILING_WHITESPACE
)
- IF(BUILD_LUA)
- IF(NOT ${LUA_CHECK_RES} EQUAL 0 OR "${LUAPATH}" EQUAL "")
- MESSAGE(SEND_ERROR "Lua was not found on your system")
- ENDIF()
+ IF(NOT ${LUA_CHECK_RES} EQUAL 0 OR "${LUAPATH}" EQUAL "")
+ MESSAGE(SEND_ERROR "Lua was not found on your system")
ENDIF()
ENDIF()
-IF(BUILD_LUA)
- ADD_LIBRARY(uci_lua MODULE uci.c)
- SET_TARGET_PROPERTIES(uci_lua PROPERTIES
- OUTPUT_NAME uci
- PREFIX ""
- )
- TARGET_LINK_LIBRARIES(uci_lua uci dl)
-
- INSTALL(TARGETS uci_lua
- LIBRARY DESTINATION ${LUAPATH}
- )
-ENDIF()
+ADD_LIBRARY(uci_lua MODULE uci.c)
+SET_TARGET_PROPERTIES(uci_lua PROPERTIES
+ OUTPUT_NAME uci
+ PREFIX ""
+)
+TARGET_LINK_LIBRARIES(uci_lua uci dl)
+INSTALL(TARGETS uci_lua
+ LIBRARY DESTINATION ${LUAPATH}
+)