2016-09-16 10:55:38 +02:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
2012-06-04 03:55:52 +02:00
|
|
|
project (server C)
|
|
|
|
|
2014-02-18 05:45:00 +01:00
|
|
|
include_directories (${CMAKE_CURRENT_SOURCE_DIR})
|
2014-03-06 16:15:43 +01:00
|
|
|
include_directories (${CJSON_INCLUDE_DIR})
|
2018-09-26 18:33:38 +02:00
|
|
|
include_directories (${CRYPTO_INCLUDE_DIR})
|
2016-12-19 21:35:02 +01:00
|
|
|
include_directories (${CLIBS_INCLUDE_DIR})
|
2013-12-31 10:06:28 +01:00
|
|
|
include_directories (${STORAGE_INCLUDE_DIR})
|
2015-07-12 03:08:29 +02:00
|
|
|
include_directories (${TOLUA_INCLUDE_DIR})
|
2018-02-04 14:59:01 +01:00
|
|
|
include_directories (${LUA_INCLUDE_DIR})
|
2012-06-04 03:55:52 +02:00
|
|
|
include_directories (${INIPARSER_INCLUDE_DIR})
|
|
|
|
|
2016-09-10 18:44:08 +02:00
|
|
|
IF(DEFINED ERESSEA_VERSION)
|
2016-09-15 20:14:17 +02:00
|
|
|
set_source_files_properties(kernel/version.c PROPERTIES
|
|
|
|
COMPILE_DEFINITIONS ERESSEA_VERSION="${ERESSEA_VERSION}")
|
2016-09-10 18:44:08 +02:00
|
|
|
ENDIF()
|
|
|
|
|
2017-01-30 10:35:52 +01:00
|
|
|
IF(DEFINED ERESSEA_BUILDNO)
|
|
|
|
set_source_files_properties(kernel/version.c PROPERTIES
|
|
|
|
COMPILE_DEFINITIONS ERESSEA_BUILDNO="${ERESSEA_BUILDNO}")
|
|
|
|
ENDIF()
|
|
|
|
|
2016-11-18 13:24:50 +01:00
|
|
|
IF (CMAKE_COMPILER_IS_GNUCC)
|
2017-03-01 18:16:07 +01:00
|
|
|
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable")
|
2016-11-18 13:24:50 +01:00
|
|
|
ENDIF()
|
|
|
|
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
2016-09-04 13:09:10 +02:00
|
|
|
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wno-sign-conversion")
|
2017-02-18 21:15:14 +01:00
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long")
|
2017-11-19 16:19:16 +01:00
|
|
|
# SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c89")
|
2015-06-01 08:04:46 +02:00
|
|
|
ELSEIF(MSVC)
|
2018-09-26 19:05:49 +02:00
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX /MP /D_CRT_SECURE_NO_WARNINGS /D_USE_MATH_DEFINES")
|
2014-08-29 07:47:47 +02:00
|
|
|
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")
|
2015-06-01 08:04:46 +02:00
|
|
|
ELSE()
|
|
|
|
MESSAGE(STATUS "unknown compiler ${CMAKE_C_COMPILER_ID}")
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
IF(CMAKE_COMPILER_IS_CLANG)
|
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wtautological-compare -Weverything")
|
|
|
|
MESSAGE(STATUS "compiler is clang: ${CMAKE_C_COMPILER_ID}")
|
|
|
|
ELSEIF(CMAKE_COMPILER_IS_GCC)
|
|
|
|
EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
|
|
|
|
OUTPUT_VARIABLE GCC_VERSION)
|
|
|
|
IF (GCC_VERSION VERSION_GREATER 4.9)
|
|
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wfloat-conversion")
|
|
|
|
ENDIF()
|
|
|
|
ENDIF(CMAKE_COMPILER_IS_CLANG)
|
2014-08-29 07:47:47 +02:00
|
|
|
|
2014-02-18 05:45:00 +01:00
|
|
|
add_subdirectory(util)
|
|
|
|
add_subdirectory(kernel)
|
|
|
|
add_subdirectory(items)
|
|
|
|
add_subdirectory(attributes)
|
|
|
|
add_subdirectory(spells)
|
|
|
|
add_subdirectory(triggers)
|
|
|
|
add_subdirectory(modules)
|
|
|
|
add_subdirectory(races)
|
|
|
|
|
2014-02-22 09:30:20 +01:00
|
|
|
MACRO(ADD_LUA_MODULE MODULE_NAME FILES)
|
|
|
|
ADD_LIBRARY (${MODULE_NAME} SHARED ${FILES})
|
|
|
|
SET_TARGET_PROPERTIES(${MODULE_NAME}
|
|
|
|
PROPERTIES
|
|
|
|
PREFIX ""
|
|
|
|
)
|
|
|
|
ENDMACRO(ADD_LUA_MODULE)
|
|
|
|
|
|
|
|
MACRO(TOLUA_BINDING PKGFILE FILES)
|
|
|
|
ADD_CUSTOM_COMMAND(
|
2014-03-08 10:28:15 +01:00
|
|
|
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${PKGFILE}.c
|
2014-02-22 09:30:20 +01:00
|
|
|
DEPENDS ${FILES} ${PKGFILE}
|
|
|
|
COMMAND ${TOLUA_EXECUTABLE}
|
2014-03-08 10:28:15 +01:00
|
|
|
ARGS -o ${CMAKE_CURRENT_SOURCE_DIR}/${PKGFILE}.c ${PKGFILE}
|
2014-02-22 09:30:20 +01:00
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
ENDMACRO(TOLUA_BINDING)
|
|
|
|
|
2014-03-08 13:28:04 +01:00
|
|
|
IF(NOT MSVC)
|
2014-06-13 22:02:03 +02:00
|
|
|
TOLUA_BINDING(log.pkg util/log.h)
|
2014-06-14 16:52:32 +02:00
|
|
|
TOLUA_BINDING(locale.pkg bind_locale.h)
|
2014-06-13 02:34:57 +02:00
|
|
|
TOLUA_BINDING(config.pkg bind_config.h)
|
2014-02-22 09:30:20 +01:00
|
|
|
TOLUA_BINDING(process.pkg bind_process.h)
|
2014-06-21 16:34:36 +02:00
|
|
|
TOLUA_BINDING(game.pkg bind_eressea.h config.h)
|
2014-02-22 09:30:20 +01:00
|
|
|
TOLUA_BINDING(eressea.pkg bind_eressea.h)
|
2015-11-22 10:33:31 +01:00
|
|
|
TOLUA_BINDING(settings.pkg kenel/config.h)
|
2014-03-08 13:28:04 +01:00
|
|
|
ENDIF()
|
2014-02-22 09:30:20 +01:00
|
|
|
|
2014-06-12 05:30:34 +02:00
|
|
|
set (ERESSEA_SRC
|
2016-11-26 16:21:41 +01:00
|
|
|
vortex.c
|
2018-09-25 18:02:00 +02:00
|
|
|
academy.c
|
|
|
|
alchemy.c
|
2018-07-05 20:06:32 +02:00
|
|
|
automate.c
|
2014-08-27 06:40:18 +02:00
|
|
|
battle.c
|
2018-02-08 18:33:58 +01:00
|
|
|
chaos.c
|
2016-09-17 22:57:22 +02:00
|
|
|
creport.c
|
2018-09-25 18:02:00 +02:00
|
|
|
direction.c
|
|
|
|
donations.c
|
2014-02-18 05:45:00 +01:00
|
|
|
economy.c
|
2018-09-25 18:02:00 +02:00
|
|
|
eressea.c
|
2018-05-18 21:14:14 +02:00
|
|
|
exparse.c
|
2018-09-25 18:07:02 +02:00
|
|
|
gamedb.c
|
2014-02-18 05:45:00 +01:00
|
|
|
give.c
|
2018-09-25 18:02:00 +02:00
|
|
|
guard.c
|
2014-02-18 05:45:00 +01:00
|
|
|
items.c
|
2018-09-25 18:02:00 +02:00
|
|
|
json.c
|
|
|
|
jsonconf.c
|
|
|
|
keyword.c
|
2014-02-18 05:45:00 +01:00
|
|
|
laws.c
|
2018-09-25 18:02:00 +02:00
|
|
|
lighthouse.c
|
2014-11-01 12:57:01 +01:00
|
|
|
magic.c
|
2014-02-18 05:45:00 +01:00
|
|
|
market.c
|
2018-09-25 18:02:00 +02:00
|
|
|
monsters.c
|
2014-12-10 19:04:02 +01:00
|
|
|
morale.c
|
2018-09-25 18:02:00 +02:00
|
|
|
move.c
|
|
|
|
names.c
|
2018-09-28 21:02:32 +02:00
|
|
|
orderdb.c
|
2017-10-07 18:03:22 +02:00
|
|
|
orderfile.c
|
2018-09-25 18:02:00 +02:00
|
|
|
piracy.c
|
|
|
|
prefix.c
|
2014-02-18 05:45:00 +01:00
|
|
|
randenc.c
|
2016-11-15 23:34:20 +01:00
|
|
|
renumber.c
|
2018-09-25 18:02:00 +02:00
|
|
|
report.c
|
|
|
|
reports.c
|
|
|
|
skill.c
|
|
|
|
spells.c
|
2014-02-18 05:45:00 +01:00
|
|
|
spy.c
|
2018-09-25 18:02:00 +02:00
|
|
|
steal.c
|
2014-02-18 05:45:00 +01:00
|
|
|
study.c
|
|
|
|
summary.c
|
2015-08-18 18:57:04 +02:00
|
|
|
travelthru.c
|
2018-09-25 18:02:00 +02:00
|
|
|
teleport.c
|
|
|
|
upkeep.c
|
|
|
|
volcano.c
|
2014-09-29 23:19:59 +02:00
|
|
|
wormhole.c
|
2014-02-18 05:45:00 +01:00
|
|
|
${SPELLS_SRC}
|
|
|
|
${RACES_SRC}
|
|
|
|
${ITEMS_SRC}
|
|
|
|
${MODULES_SRC}
|
|
|
|
${TRIGGERS_SRC}
|
|
|
|
${ATTRIBUTES_SRC}
|
|
|
|
${KERNEL_SRC}
|
2017-11-18 12:54:48 +01:00
|
|
|
${DB_SRC}
|
2014-02-18 05:45:00 +01:00
|
|
|
${UTIL_SRC}
|
2018-09-27 19:52:54 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(CHECK_SRC
|
|
|
|
checker.c
|
2018-09-28 20:50:24 +02:00
|
|
|
orderfile.c
|
2018-09-27 19:52:54 +02:00
|
|
|
)
|
2012-06-05 06:45:25 +02:00
|
|
|
|
2014-06-12 05:30:34 +02:00
|
|
|
set(SERVER_SRC
|
|
|
|
bind_building.c
|
2014-06-13 02:34:57 +02:00
|
|
|
bind_config.c
|
2014-06-12 05:30:34 +02:00
|
|
|
bind_eressea.c
|
|
|
|
bind_faction.c
|
2018-09-25 18:02:00 +02:00
|
|
|
bind_locale.c
|
2014-06-12 05:30:34 +02:00
|
|
|
bind_message.c
|
|
|
|
bind_monsters.c
|
2018-09-25 18:02:00 +02:00
|
|
|
bind_order.c
|
2014-06-12 05:30:34 +02:00
|
|
|
bind_process.c
|
|
|
|
bind_region.c
|
|
|
|
bind_ship.c
|
|
|
|
bind_storage.c
|
2018-09-25 18:02:00 +02:00
|
|
|
bind_tolua.c
|
2014-06-12 05:30:34 +02:00
|
|
|
bind_unit.c
|
2018-09-25 18:02:00 +02:00
|
|
|
bindings.c
|
|
|
|
console.c
|
|
|
|
helpers.c
|
|
|
|
main.c
|
2018-09-27 19:52:54 +02:00
|
|
|
)
|
2014-06-12 05:30:34 +02:00
|
|
|
|
|
|
|
if (CURSES_FOUND)
|
2015-01-10 17:27:18 +01:00
|
|
|
set (SERVER_SRC ${SERVER_SRC}
|
2018-09-25 18:02:00 +02:00
|
|
|
bind_gmtool.c
|
2014-06-12 05:30:34 +02:00
|
|
|
gmtool.c
|
|
|
|
listbox.c
|
2015-01-10 17:27:18 +01:00
|
|
|
)
|
2014-06-12 05:30:34 +02:00
|
|
|
endif(CURSES_FOUND)
|
|
|
|
|
2018-09-23 19:03:28 +02:00
|
|
|
find_program(IWYU_PATH NAMES include-what-you-use iwyu)
|
|
|
|
if(NOT IWYU_PATH)
|
|
|
|
message(STATUS "Could not find the program include-what-you-use")
|
|
|
|
endif()
|
|
|
|
|
2016-09-16 10:55:38 +02:00
|
|
|
add_library(version STATIC ${VERSION_SRC})
|
|
|
|
add_library(game ${ERESSEA_SRC})
|
2018-09-29 09:56:05 +02:00
|
|
|
|
|
|
|
#add_executable(checker ${CHECK_SRC})
|
|
|
|
|
2014-06-12 06:25:24 +02:00
|
|
|
add_executable(eressea ${SERVER_SRC})
|
2018-09-23 19:03:28 +02:00
|
|
|
if (IWYU_PATH)
|
|
|
|
set_property(TARGET eressea PROPERTY C_INCLUDE_WHAT_YOU_USE ${IWYU_PATH})
|
|
|
|
endif(IWYU_PATH)
|
2016-09-16 10:55:38 +02:00
|
|
|
target_link_libraries(game version)
|
2014-02-18 05:45:00 +01:00
|
|
|
target_link_libraries(eressea
|
2015-01-10 17:27:18 +01:00
|
|
|
game
|
2014-02-18 05:45:00 +01:00
|
|
|
${TOLUA_LIBRARIES}
|
2014-06-12 05:30:34 +02:00
|
|
|
${LUA_LIBRARIES}
|
2014-02-18 05:45:00 +01:00
|
|
|
${STORAGE_LIBRARIES}
|
2016-12-19 21:35:02 +01:00
|
|
|
${CLIBS_LIBRARIES}
|
2018-09-26 18:33:38 +02:00
|
|
|
${CRYPTO_LIBRARIES}
|
2014-03-06 16:15:43 +01:00
|
|
|
${CJSON_LIBRARIES}
|
2014-02-18 05:45:00 +01:00
|
|
|
${INIPARSER_LIBRARIES}
|
2014-06-12 05:30:34 +02:00
|
|
|
)
|
2014-02-18 05:45:00 +01:00
|
|
|
|
2014-06-12 05:30:34 +02:00
|
|
|
set(TESTS_SRC
|
2017-12-29 13:37:17 +01:00
|
|
|
academy.test.c
|
2017-05-07 13:35:59 +02:00
|
|
|
alchemy.test.c
|
2018-07-07 17:29:22 +02:00
|
|
|
automate.test.c
|
2014-08-27 06:40:18 +02:00
|
|
|
battle.test.c
|
2016-09-17 22:57:22 +02:00
|
|
|
creport.test.c
|
2014-06-16 17:01:59 +02:00
|
|
|
direction.test.c
|
2017-05-07 13:35:59 +02:00
|
|
|
donations.test.c
|
2014-06-16 17:01:59 +02:00
|
|
|
economy.test.c
|
2017-05-07 13:35:59 +02:00
|
|
|
give.test.c
|
|
|
|
guard.test.c
|
2014-08-31 08:58:55 +02:00
|
|
|
json.test.c
|
2018-01-14 17:50:54 +01:00
|
|
|
jsonconf.test.c
|
2014-08-31 08:58:55 +02:00
|
|
|
keyword.test.c
|
2014-06-16 17:01:59 +02:00
|
|
|
laws.test.c
|
2016-09-17 12:34:02 +02:00
|
|
|
lighthouse.test.c
|
2014-11-01 12:57:01 +01:00
|
|
|
magic.test.c
|
2014-08-31 08:58:55 +02:00
|
|
|
market.test.c
|
2015-11-17 02:07:46 +01:00
|
|
|
monsters.test.c
|
2014-08-31 08:58:55 +02:00
|
|
|
move.test.c
|
2017-05-07 13:35:59 +02:00
|
|
|
names.test.c
|
2018-09-28 21:02:32 +02:00
|
|
|
orderdb.test.c
|
2017-10-07 20:17:04 +02:00
|
|
|
orderfile.test.c
|
2015-10-12 11:54:59 +02:00
|
|
|
piracy.test.c
|
2015-09-12 12:24:10 +02:00
|
|
|
prefix.test.c
|
2016-11-16 20:03:34 +01:00
|
|
|
renumber.test.c
|
2017-05-07 13:35:59 +02:00
|
|
|
report.test.c
|
2018-09-25 18:02:00 +02:00
|
|
|
reports.test.c
|
2014-08-31 08:58:55 +02:00
|
|
|
skill.test.c
|
2015-05-06 17:36:20 +02:00
|
|
|
spells.test.c
|
2015-01-18 17:40:54 +01:00
|
|
|
spy.test.c
|
2015-07-09 13:24:21 +02:00
|
|
|
study.test.c
|
2018-09-25 18:02:00 +02:00
|
|
|
summary.test.c
|
|
|
|
test_eressea.c
|
|
|
|
tests.c
|
2017-05-07 13:35:59 +02:00
|
|
|
tests.test.c
|
|
|
|
travelthru.test.c
|
2015-05-06 17:36:20 +02:00
|
|
|
upkeep.test.c
|
2017-05-07 13:35:59 +02:00
|
|
|
volcano.test.c
|
|
|
|
vortex.test.c
|
|
|
|
wormhole.test.c
|
2015-11-02 15:40:26 +01:00
|
|
|
spells/flyingship.test.c
|
2015-07-07 20:23:24 +02:00
|
|
|
spells/magicresistance.test.c
|
2015-11-09 19:43:51 +01:00
|
|
|
triggers/shock.test.c
|
2014-11-01 12:09:56 +01:00
|
|
|
${ATTRIBUTES_TESTS}
|
2014-02-18 05:45:00 +01:00
|
|
|
${UTIL_TESTS}
|
|
|
|
${KERNEL_TESTS}
|
2015-05-24 07:17:23 +02:00
|
|
|
${ITEMS_TESTS}
|
2014-02-18 05:45:00 +01:00
|
|
|
)
|
|
|
|
|
2014-06-12 05:30:34 +02:00
|
|
|
add_executable(test_eressea ${TESTS_SRC})
|
2014-02-18 05:45:00 +01:00
|
|
|
target_link_libraries(test_eressea
|
2015-01-10 17:27:18 +01:00
|
|
|
game
|
2017-01-26 16:05:44 +01:00
|
|
|
cutest
|
2014-02-18 05:45:00 +01:00
|
|
|
${LUA_LIBRARIES}
|
2016-12-19 21:35:02 +01:00
|
|
|
${CLIBS_LIBRARIES}
|
2014-02-18 05:45:00 +01:00
|
|
|
${STORAGE_LIBRARIES}
|
2018-09-26 18:33:38 +02:00
|
|
|
${CRYPTO_LIBRARIES}
|
2014-03-06 16:15:43 +01:00
|
|
|
${CJSON_LIBRARIES}
|
2014-02-18 05:45:00 +01:00
|
|
|
${INIPARSER_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_test(server test_eressea)
|
2014-08-07 13:23:11 +02:00
|
|
|
#add_test(NAME E3
|
|
|
|
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/game-e3
|
|
|
|
# COMMAND $<TARGET_FILE:eressea> runtests.lua )
|
|
|
|
#add_test(NAME E2
|
|
|
|
# WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/game-e2
|
|
|
|
# COMMAND $<TARGET_FILE:eressea> runtests.lua )
|
2014-03-02 21:20:49 +01:00
|
|
|
|
2014-07-17 15:55:50 +02:00
|
|
|
install(TARGETS eressea DESTINATION "bin")
|
2014-06-10 04:04:11 +02:00
|
|
|
|
2018-03-11 16:52:07 +01:00
|
|
|
if (HAVE_EXECINFO_H AND HAVE_SIGNAL_H)
|
|
|
|
add_definitions(-DHAVE_BACKTRACE)
|
|
|
|
endif ()
|
|
|
|
|
2017-12-31 21:33:31 +01:00
|
|
|
if (HAVE_LIBBSD)
|
|
|
|
add_definitions(-DHAVE_LIBBSD)
|
|
|
|
endif (HAVE_LIBBSD)
|
|
|
|
|
2017-12-11 08:53:10 +01:00
|
|
|
if (HAVE_STRLCAT)
|
2017-12-12 09:19:35 +01:00
|
|
|
add_definitions(-DHAVE_BSDSTRING)
|
2017-12-31 21:33:31 +01:00
|
|
|
endif (HAVE_STRLCAT)
|
2017-12-11 08:53:10 +01:00
|
|
|
|
2017-12-12 09:19:35 +01:00
|
|
|
if (HAVE_STRDUP)
|
|
|
|
add_definitions(-DHAVE_STRDUP)
|
|
|
|
endif(HAVE_STRDUP)
|
|
|
|
|
2017-12-31 21:33:31 +01:00
|
|
|
if (HAVE_LIBBSD)
|
|
|
|
target_link_libraries(test_eressea bsd)
|
|
|
|
target_link_libraries(eressea bsd)
|
|
|
|
endif (HAVE_LIBBSD)
|
|
|
|
|
2018-01-28 18:26:54 +01:00
|
|
|
if (SQLITE3_FOUND)
|
2017-11-16 18:30:18 +01:00
|
|
|
include_directories (${SQLITE3_INCLUDE_DIR})
|
2017-01-22 12:57:25 +01:00
|
|
|
target_link_libraries(eressea ${SQLITE3_LIBRARIES})
|
2017-11-09 21:12:25 +01:00
|
|
|
target_link_libraries(test_eressea ${SQLITE3_LIBRARIES})
|
2017-01-22 12:57:25 +01:00
|
|
|
add_definitions(-DUSE_SQLITE)
|
2018-01-28 18:26:54 +01:00
|
|
|
elseif (DB_FOUND)
|
|
|
|
include_directories (${DB_INCLUDE_DIR})
|
|
|
|
target_link_libraries(eressea ${DB_LIBRARIES})
|
|
|
|
target_link_libraries(test_eressea ${DB_LIBRARIES})
|
|
|
|
add_definitions(-DUSE_DB)
|
|
|
|
endif(SQLITE3_FOUND)
|
2017-01-22 12:57:25 +01:00
|
|
|
|
2018-02-25 16:36:22 +01:00
|
|
|
if (READLINE_FOUND)
|
|
|
|
include_directories (${READLINE_INCLUDE_DIR})
|
|
|
|
target_link_libraries(eressea ${READLINE_LIBRARY})
|
|
|
|
add_definitions(-DUSE_READLINE)
|
|
|
|
endif (READLINE_FOUND)
|
|
|
|
|
2014-06-12 05:30:34 +02:00
|
|
|
if (CURSES_FOUND)
|
|
|
|
include_directories (${CURSES_INCLUDE_DIR})
|
|
|
|
target_link_libraries(eressea ${CURSES_LIBRARIES})
|
2016-09-15 20:14:17 +02:00
|
|
|
add_definitions(-DUSE_CURSES)
|
2014-06-12 05:30:34 +02:00
|
|
|
endif(CURSES_FOUND)
|
|
|
|
|
2018-04-24 21:50:49 +02:00
|
|
|
if (EXPAT_FOUND)
|
|
|
|
include_directories (${EXPAT_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(eressea ${EXPAT_LIBRARIES})
|
|
|
|
target_link_libraries(test_eressea ${EXPAT_LIBRARIES})
|
|
|
|
endif (EXPAT_FOUND)
|