diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-04-07 01:13:57 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-04-07 01:13:57 +0200 |
commit | 0b39b5637a6560bdec271e73daf044348e6e1c28 (patch) | |
tree | 5e8af745df3bba210441b9cafdf303f94ac1391a /lua | |
parent | 352572f18e30295cab3d260efd5c5455026443fa (diff) | |
download | uci-0b39b5637a6560bdec271e73daf044348e6e1c28.tar.gz |
do not attempt to build lua if disabled
Diffstat (limited to 'lua')
-rw-r--r-- | lua/CMakeLists.txt | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt index b3e2ca7..a532fc1 100644 --- a/lua/CMakeLists.txt +++ b/lua/CMakeLists.txt @@ -19,18 +19,23 @@ IF(NOT LUAPATH) OUTPUT_STRIP_TRAILING_WHITESPACE ) - IF(NOT ${LUA_CHECK_RES} EQUAL 0 OR ${LUAPATH} EQUAL "") - MESSAGE(SEND_ERROR "Lua was not found on your system") + IF(BUILD_LUA) + IF(NOT ${LUA_CHECK_RES} EQUAL 0 OR ${LUAPATH} EQUAL "") + MESSAGE(SEND_ERROR "Lua was not found on your system") + ENDIF() ENDIF() 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) +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() -INSTALL(TARGETS uci_lua - LIBRARY DESTINATION ${LUAPATH} -) |