fix find_package call for Lua

This commit is contained in:
Enno Rehling 2017-03-27 21:59:56 +02:00
parent 3b3379ad4b
commit c4e15fd5ba
2 changed files with 7 additions and 5 deletions

View File

@ -6,7 +6,7 @@ endif(WIN32)
project (eressea-server C)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH})
enable_testing()
find_package (LibXml2)
@ -14,10 +14,10 @@ find_package (SQLite3)
find_package (Curses)
find_package (ToLua REQUIRED)
if (TOLUA_FOUND)
if (${TOLUA_VERSION_STRING} VERSION_EQUAL "5.2")
find_package (Lua 5.2 REQUIRED)
elseif (${TOLUA_VERSION_STRING} VERSION_EQUAL "5.1")
if (${TOLUA_VERSION_STRING} VERSION_GREATER "5.2")
find_package (Lua 5.2 REQUIRED)
elseif (${TOLUA_VERSION_STRING} VERSION_GREATER "5.1")
find_package (Lua 5.1 REQUIRED)
endif()
endif(TOLUA_FOUND)

View File

@ -187,10 +187,12 @@ target_link_libraries(eressea
${INIPARSER_LIBRARIES}
)
find_library(C_MATH_LIBRARY m)
add_executable(convert convert.c)
target_link_libraries(convert
game
${LUA_MATH_LIBRARY}
${C_MATH_LIBRARY}
${STORAGE_LIBRARIES}
${CLIBS_LIBRARIES}
${INIPARSER_LIBRARIES}