From c4e15fd5ba267330075246ab4fa742335605b327 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 27 Mar 2017 21:59:56 +0200 Subject: [PATCH] fix find_package call for Lua --- CMakeLists.txt | 8 ++++---- src/CMakeLists.txt | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 892c5b4f0..02146f1f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ebe914dfe..fe4613e7d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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}