2017-04-22 18:07:09 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
project (eressea-server C)
|
|
|
|
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules/" ${CMAKE_MODULE_PATH})
|
|
|
|
|
2014-03-16 06:02:49 +01:00
|
|
|
if (WIN32)
|
|
|
|
FILE(TO_CMAKE_PATH "${CMAKE_MODULE_PATH}" CMAKE_MODULE_PATH )
|
|
|
|
FILE(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH )
|
|
|
|
endif(WIN32)
|
|
|
|
|
2017-04-22 18:07:09 +02:00
|
|
|
if (MSVC)
|
|
|
|
include(MSVC)
|
|
|
|
endif (MSVC)
|
2010-08-08 07:17:11 +02:00
|
|
|
|
2017-01-22 12:57:25 +01:00
|
|
|
find_package (SQLite3)
|
2015-06-08 22:23:07 +02:00
|
|
|
find_package (Curses)
|
2017-04-22 18:07:09 +02:00
|
|
|
find_package (LibXml2)
|
2015-06-08 22:23:07 +02:00
|
|
|
find_package (ToLua REQUIRED)
|
2017-04-22 18:07:09 +02:00
|
|
|
if (TOLUA_FOUND)
|
|
|
|
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)
|
|
|
|
|
|
|
|
enable_testing()
|
2012-05-23 22:51:52 +02:00
|
|
|
|
2014-03-06 16:15:43 +01:00
|
|
|
add_subdirectory (cJSON)
|
2013-12-31 10:06:28 +01:00
|
|
|
add_subdirectory (storage)
|
2012-06-07 21:44:25 +02:00
|
|
|
add_subdirectory (iniparser)
|
2016-12-19 21:35:02 +01:00
|
|
|
add_subdirectory (clibs)
|
2016-02-10 23:06:41 +01:00
|
|
|
add_subdirectory (process)
|
2014-02-18 05:45:00 +01:00
|
|
|
add_subdirectory (src eressea)
|
2017-04-22 18:07:09 +02:00
|
|
|
|
2014-08-17 11:19:04 +02:00
|
|
|
install(DIRECTORY res conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.xml")
|
2015-02-08 12:05:50 +01:00
|
|
|
install(DIRECTORY res conf DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.json")
|
2014-07-17 15:55:50 +02:00
|
|
|
install(DIRECTORY scripts DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.lua")
|
2017-01-20 08:32:31 +01:00
|
|
|
install(DIRECTORY lunit DESTINATION ${CMAKE_INSTALL_PREFIX} FILES_MATCHING PATTERN "*.lua")
|
2015-06-17 07:29:22 +02:00
|
|
|
install(DIRECTORY share DESTINATION ${CMAKE_INSTALL_PREFIX})
|
2017-04-22 18:07:09 +02:00
|
|
|
|