Mercurial > hg > orthanc
diff Resources/CMake/LuaConfiguration.cmake @ 429:09b3c6265a94
unit test for fedora 18 problem
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 08 May 2013 15:13:01 +0200 |
parents | 26bb4d05a072 |
children | 27d32fc6209a |
line wrap: on
line diff
--- a/Resources/CMake/LuaConfiguration.cmake Wed May 08 13:06:04 2013 +0200 +++ b/Resources/CMake/LuaConfiguration.cmake Wed May 08 15:13:01 2013 +0200 @@ -56,15 +56,12 @@ source_group(ThirdParty\\Lua REGULAR_EXPRESSION ${LUA_SOURCES_DIR}/.*) else() - CHECK_INCLUDE_FILE_CXX(lua.h HAVE_LUA_H) - if (NOT HAVE_LUA_H) + include(FindLua51) + + if (NOT LUA51_FOUND) message(FATAL_ERROR "Please install the liblua-dev package") endif() - CHECK_LIBRARY_EXISTS(lua lua_pcall "" HAVE_LUA_LIB) - if (NOT HAVE_LUA_LIB) - message(FATAL_ERROR "Please install the liblua-dev package") - endif() - - link_libraries(lua) + include_directories(${LUA_INCLUDE_DIR}) + link_libraries(${LUA_LIBRARIES}) endif()