CMakeLists.txt 1019 B

1234567891011121314151617181920212223242526
  1. cmake_minimum_required(VERSION 3.0)
  2. project(PulsarServer)
  3. find_package(CJSON REQUIRED)
  4. set(TARGET server)
  5. set(TARGET_HEADER_FILES include/action.h include/client.h include/conf.h include/erreur.h include/exec.h include/game.h
  6. include/ipc.h include/message.h include/network.h include/parser.h include/objects.h include/player.h
  7. include/public.h include/server.h include/pulse.h include/map.h include/time.h)
  8. add_executable(${TARGET} main.c init.c player.c exec.c ipc.c client.c message.c parser.c map.c map_parser.c bouvier.c
  9. game.c time.c pulse.c objects.c network.c network_connect.c ${TARGET_HEADER_FILES} conf.c)
  10. target_include_directories(${TARGET} PRIVATE ${CJSON_INCLUDE_DIRS} include)
  11. if (ENABLE_PASCAL)
  12. target_compile_definitions(${TARGET} PRIVATE -DENABLE_GPC)
  13. target_link_library(${TARGET} gpc)
  14. endif()
  15. target_compile_options(${TARGET} PRIVATE -rdynamic)
  16. target_link_libraries(${TARGET} ${CJSON_LIBRARY} pulsarnet)
  17. install(TARGETS ${TARGET} RUNTIME DESTINATION "bin")