complete rewrite of cmake files

This commit is contained in:
Enno Rehling 2012-06-03 18:55:52 -07:00
parent 7de08fbd8f
commit 8c5c6aa911
2 changed files with 36 additions and 1 deletions

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 2.4) cmake_minimum_required(VERSION 2.4)
project (server) project (server C)
enable_testing() enable_testing()

35
src/CMakeLists.txt Normal file
View File

@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 2.4)
project (server C)
find_package (Lua51 REQUIRED)
find_package (LibXml2 REQUIRED)
find_package (Sqlite3 REQUIRED)
find_package (ToLua REQUIRED)
find_package (Curses REQUIRED)
include_directories (${CORE_INCLUDE_DIR})
include_directories (${CRITBIT_INCLUDE_DIR})
include_directories (${CRYPTO_INCLUDE_DIR})
include_directories (${QUICKLIST_INCLUDE_DIR})
include_directories (${CUTEST_INCLUDE_DIR})
include_directories (${LUA_INCLUDE_DIR})
include_directories (${LIBXML2_INCLUDE_DIR})
include_directories (${BSON_INCLUDE_DIR})
include_directories (${INIPARSER_INCLUDE_DIR})
add_executable(server main.c)
target_link_libraries(server eressea)
target_link_libraries(server ${QUICKLIST_LIBRARIES})
target_link_libraries(server ${CRITBIT_LIBRARIES})
target_link_libraries(server ${BSON_LIBRARIES})
target_link_libraries(server ${CRYPTO_LIBRARIES})
target_link_libraries(server ${INIPARSER_LIBRARIES})
target_link_libraries(server ${CUTEST_LIBRARIES})
target_link_libraries(server ${CURSES_LIBRARIES})
target_link_libraries(server ${LUA_LIBRARIES})
target_link_libraries(server ${TOLUA_LIBRARIES})
target_link_libraries(server ${LIBXML2_LIBRARIES})
target_link_libraries(server ${SQLITE3_LIBRARIES})
add_test (server server --tests)