2012-06-04 08:39:32 +02:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
2013-12-27 01:02:41 +01:00
|
|
|
project (eressea-server C)
|
2010-08-08 07:17:11 +02:00
|
|
|
|
2012-06-04 03:47:43 +02:00
|
|
|
enable_testing()
|
2012-05-23 22:51:52 +02:00
|
|
|
|
2013-05-12 23:51:54 +02:00
|
|
|
INCLUDE (CheckIncludeFiles)
|
|
|
|
INCLUDE (CheckSymbolExists)
|
|
|
|
CHECK_INCLUDE_FILES (stdbool.h HAVE_STDBOOL_H)
|
|
|
|
CHECK_SYMBOL_EXISTS (_Bool "stdbool.h" HAVE__BOOL)
|
|
|
|
CHECK_INCLUDE_FILES (strings.h HAVE_STRINGS_H)
|
2013-12-29 09:19:22 +01:00
|
|
|
CHECK_SYMBOL_EXISTS (strdup "string.h" HAVE_STRDUP)
|
|
|
|
CHECK_SYMBOL_EXISTS (_strdup "string.h" HAVE__STRDUP)
|
2013-12-31 10:25:25 +01:00
|
|
|
CHECK_SYMBOL_EXISTS (mkdir "sys/stat.h" HAVE_MKDIR)
|
|
|
|
CHECK_SYMBOL_EXISTS (_mkdir "direct.h" HAVE__MKDIR)
|
2013-05-12 23:51:54 +02:00
|
|
|
|
|
|
|
CONFIGURE_FILE (
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
|
|
|
|
${CMAKE_BINARY_DIR}/include/config.h)
|
|
|
|
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/include)
|
|
|
|
|
2013-05-05 02:29:39 +02:00
|
|
|
IF(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 -DHAVE__BOOL")
|
2013-12-29 08:01:51 +01:00
|
|
|
elseif(MSVC)
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_DEBUG
|
|
|
|
"${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE
|
|
|
|
"${CMAKE_EXE_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrtd.lib")
|
2013-05-05 02:29:39 +02:00
|
|
|
ELSE(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
MESSAGE(STATUS "Unknown compiler ${CMAKE_C_COMPILER_ID}")
|
|
|
|
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
|
2013-05-05 00:47:53 +02:00
|
|
|
find_package (LibXml2 REQUIRED)
|
|
|
|
find_package (SQLite3 REQUIRED)
|
2013-12-29 00:13:22 +01:00
|
|
|
find_package (Curses REQUIRED)
|
|
|
|
find_package (Lua REQUIRED)
|
|
|
|
find_package (ToLua REQUIRED)
|
2013-05-05 00:47:53 +02:00
|
|
|
|
2013-12-31 09:05:52 +01:00
|
|
|
add_subdirectory (cutest)
|
2012-06-07 21:44:25 +02:00
|
|
|
add_subdirectory (crypto)
|
2013-12-31 10:06:28 +01:00
|
|
|
add_subdirectory (storage)
|
2012-06-07 21:44:25 +02:00
|
|
|
add_subdirectory (iniparser)
|
2013-12-31 09:05:52 +01:00
|
|
|
add_subdirectory (quicklist)
|
2012-06-07 21:44:25 +02:00
|
|
|
add_subdirectory (critbit)
|
2013-05-12 00:05:33 +02:00
|
|
|
add_subdirectory (core/src eressea)
|
2013-12-31 09:05:52 +01:00
|
|
|
add_subdirectory (src server)
|