# HG changeset patch # User nemo # Date 1339600710 14400 # Node ID 225179f64fd87167da84715360830cf983d85ee0 # Parent c34516ec0f27f4bb90f64323832c7735c4e0bdee LUA_FOUND should surely be set only if the system lua was found. diff -r c34516ec0f27 -r 225179f64fd8 CMakeLists.txt --- a/CMakeLists.txt Tue Jun 12 21:42:22 2012 -0400 +++ b/CMakeLists.txt Wed Jun 13 11:18:30 2012 -0400 @@ -200,7 +200,7 @@ endif() find_package(Lua) -if(${LUA_FOUND}) +if(LUA_FOUND) message(STATUS "Lua library is present on your system (${LUA_DEFAULT})") else() message(STATUS "Lua library not found, building bundled dependency") diff -r c34516ec0f27 -r 225179f64fd8 cmake_modules/FindLua.cmake --- a/cmake_modules/FindLua.cmake Tue Jun 12 21:42:22 2012 -0400 +++ b/cmake_modules/FindLua.cmake Wed Jun 13 11:18:30 2012 -0400 @@ -20,8 +20,8 @@ FIND_LIBRARY(LUA_DEFAULT NAMES lua51 lua5.1 lua-5.1 lua PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib) IF(${LUA_DEFAULT} MATCHES "LUA_DEFAULT-NOTFOUND") set(LUA_DEFAULT lua) + ELSE() set(LUA_FOUND true) - ELSE() message(STATUS "LibLua 5.1 found at ${LUA_DEFAULT}") #remove the path (fpc doesn't like it - why?) GET_FILENAME_COMPONENT(LUA_DEFAULT ${LUA_DEFAULT} NAME) diff -r c34516ec0f27 -r 225179f64fd8 hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Tue Jun 12 21:42:22 2012 -0400 +++ b/hedgewars/CMakeLists.txt Wed Jun 13 11:18:30 2012 -0400 @@ -217,7 +217,7 @@ add_custom_target(${engine_output_name} ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}${CMAKE_EXECUTABLE_SUFFIX}") #when system Lua is not found we need to compile it before engine -if(NOT ${LUA_FOUND}) +if(NOT LUA_FOUND) add_dependencies(${engine_output_name} lua) endif()