2016-08-19 01:38:33 +00:00
|
|
|
project(tes3mp-server)
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2016-10-23 09:07:46 +00:00
|
|
|
option(ENABLE_BREAKPAD "Enable Google Breakpad for Crash reporting" OFF)
|
|
|
|
|
|
|
|
if(ENABLE_BREAKPAD)
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_BREAKPAD")
|
|
|
|
if (UNIX)
|
|
|
|
set(Breakpad_Headers "${CMAKE_SOURCE_DIR}/extern/breakpad/src/client/linux")
|
|
|
|
set(Breakpad_Library "${CMAKE_SOURCE_DIR}/extern/breakpad/src/client/linux/libbreakpad_client.a")
|
|
|
|
elseif(WIN32)
|
|
|
|
set(Breakpad_Headers "${CMAKE_SOURCE_DIR}/extern/breakpad/src/client/windows")
|
2016-11-20 16:34:22 +00:00
|
|
|
set(Breakpad_Library "-lbreakpad_client")
|
2016-10-23 09:07:46 +00:00
|
|
|
endif (UNIX)
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/extern/breakpad/src ${Breakpad_Headers})
|
2016-10-23 16:28:35 +00:00
|
|
|
endif(ENABLE_BREAKPAD)
|
|
|
|
|
2016-07-23 17:06:14 +00:00
|
|
|
|
|
|
|
|
2017-08-27 16:15:56 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_LUA")
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
# local files
|
|
|
|
set(SERVER
|
|
|
|
main.cpp
|
2017-08-27 16:15:56 +00:00
|
|
|
Player.cpp Players.cpp
|
2016-01-12 03:41:44 +00:00
|
|
|
Networking.cpp
|
2016-08-14 23:48:25 +00:00
|
|
|
MasterClient.cpp
|
2017-02-19 05:26:42 +00:00
|
|
|
Cell.cpp
|
2017-04-29 20:05:12 +00:00
|
|
|
CellController.cpp
|
2017-03-04 05:08:22 +00:00
|
|
|
Utils.cpp
|
2017-08-27 16:15:56 +00:00
|
|
|
CharClass.cpp
|
|
|
|
Inventory.cpp
|
|
|
|
Settings.cpp
|
|
|
|
Timer.cpp
|
|
|
|
Books.cpp
|
|
|
|
GUI.cpp
|
|
|
|
Dialogue.cpp
|
|
|
|
Factions.cpp
|
|
|
|
Cells.cpp
|
|
|
|
Quests.cpp
|
|
|
|
Spells.cpp
|
|
|
|
Actors.cpp
|
|
|
|
NetActor.cpp
|
|
|
|
CellState.cpp
|
|
|
|
Object.cpp
|
2017-10-26 15:24:35 +00:00
|
|
|
stacktrace.cpp
|
2017-11-25 15:47:02 +00:00
|
|
|
Window.cpp
|
2017-12-10 02:16:16 +00:00
|
|
|
Weather.cpp
|
2018-06-04 15:51:17 +00:00
|
|
|
Worldstate.cpp
|
2018-01-02 03:57:32 +00:00
|
|
|
BaseMgr.cpp
|
2017-08-27 16:15:56 +00:00
|
|
|
Script/CommandController.cpp Script/EventController.cpp Script/LuaState.cpp Script/luaUtils.cpp
|
2016-01-12 03:41:44 +00:00
|
|
|
)
|
|
|
|
|
2017-10-26 21:27:00 +00:00
|
|
|
if(WIN32)
|
|
|
|
list(APPEND SERVER stackwalker/StackWalker.cpp)
|
|
|
|
endif()
|
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
set(SERVER_HEADER
|
2017-08-27 16:15:56 +00:00
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
)
|
2016-08-19 01:38:33 +00:00
|
|
|
source_group(tes3mp-server FILES ${SERVER} ${SERVER_HEADER})
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2017-04-23 05:59:17 +00:00
|
|
|
set(PROCESSORS_ACTOR
|
|
|
|
processors/actor/ProcessorActorAnimFlags.hpp processors/actor/ProcessorActorAnimPlay.hpp
|
2017-05-29 01:43:52 +00:00
|
|
|
processors/actor/ProcessorActorAttack.hpp processors/actor/ProcessorActorCellChange.hpp
|
2018-01-29 20:32:51 +00:00
|
|
|
processors/actor/ProcessorActorEquipment.hpp processors/actor/ProcessorActorInteraction.hpp
|
|
|
|
processors/actor/ProcessorActorList.hpp processors/actor/ProcessorActorPosition.hpp
|
|
|
|
processors/actor/ProcessorActorSpeech.hpp processors/actor/ProcessorActorStatsDynamic.hpp
|
|
|
|
processors/actor/ProcessorActorTest.hpp
|
2017-04-23 05:59:17 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
source_group(tes3mp-server\\processors\\actor FILES ${PROCESSORS_ACTOR})
|
|
|
|
|
|
|
|
set(PROCESSORS_PLAYER
|
|
|
|
processors/player/ProcessorChatMsg.hpp processors/player/ProcessorGUIMessageBox.hpp
|
2018-05-25 03:34:07 +00:00
|
|
|
|
2018-01-29 22:54:56 +00:00
|
|
|
processors/player/ProcessorGUIWindow.hpp
|
|
|
|
|
2018-05-23 04:48:28 +00:00
|
|
|
processors/player/ProcessorGameWeather.hpp processors/player/ProcessorPlayerAnimFlags.hpp
|
|
|
|
processors/player/ProcessorPlayerAnimPlay.hpp processors/player/ProcessorPlayerAttack.hpp
|
|
|
|
processors/player/ProcessorPlayerAttribute.hpp processors/player/ProcessorPlayerBook.hpp
|
|
|
|
processors/player/ProcessorPlayerBounty.hpp processors/player/ProcessorPlayerCellChange.hpp
|
|
|
|
processors/player/ProcessorPlayerCellState.hpp processors/player/ProcessorPlayerCharClass.hpp
|
|
|
|
processors/player/ProcessorPlayerCharGen.hpp processors/player/ProcessorPlayerDeath.hpp
|
|
|
|
processors/player/ProcessorPlayerDisposition.hpp processors/player/ProcessorPlayerEquipment.hpp
|
|
|
|
processors/player/ProcessorPlayerFaction.hpp processors/player/ProcessorPlayerInteraction.hpp
|
|
|
|
processors/player/ProcessorPlayerInventory.hpp processors/player/ProcessorPlayerJournal.hpp
|
|
|
|
processors/player/ProcessorPlayerKillCount.hpp processors/player/ProcessorPlayerLevel.hpp
|
2018-06-07 09:49:12 +00:00
|
|
|
processors/player/ProcessorPlayerMiscellaneous.hpp processors/player/ProcessorPlayerPosition.hpp
|
|
|
|
processors/player/ProcessorPlayerQuickKeys.hpp processors/player/ProcessorPlayerRest.hpp
|
|
|
|
processors/player/ProcessorPlayerResurrect.hpp processors/player/ProcessorPlayerShapeshift.hpp
|
|
|
|
processors/player/ProcessorPlayerSkill.hpp processors/player/ProcessorPlayerSpeech.hpp
|
|
|
|
processors/player/ProcessorPlayerSpellbook.hpp processors/player/ProcessorPlayerStatsDynamic.hpp
|
|
|
|
processors/player/ProcessorPlayerTopic.hpp
|
2017-04-23 05:59:17 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
source_group(tes3mp-server\\processors\\player FILES ${PROCESSORS_PLAYER})
|
|
|
|
|
2018-05-16 21:08:37 +00:00
|
|
|
set(PROCESSORS_OBJECT
|
2018-05-15 19:07:06 +00:00
|
|
|
processors/object/ProcessorContainer.hpp processors/object/ProcessorDoorState.hpp
|
|
|
|
processors/object/ProcessorMusicPlay.hpp processors/object/ProcessorObjectAnimPlay.hpp
|
|
|
|
processors/object/ProcessorObjectDelete.hpp processors/object/ProcessorObjectLock.hpp
|
|
|
|
processors/object/ProcessorObjectMove.hpp processors/object/ProcessorObjectPlace.hpp
|
|
|
|
processors/object/ProcessorObjectRotate.hpp processors/object/ProcessorObjectScale.hpp
|
|
|
|
processors/object/ProcessorObjectSpawn.hpp processors/object/ProcessorObjectState.hpp
|
|
|
|
processors/object/ProcessorObjectTrap.hpp processors/object/ProcessorScriptLocalShort.hpp
|
|
|
|
processors/object/ProcessorScriptLocalFloat.hpp processors/object/ProcessorScriptMemberShort.hpp
|
|
|
|
processors/object/ProcessorScriptMemberFloat.hpp processors/object/ProcessorScriptGlobalShort.hpp
|
|
|
|
processors/object/ProcessorScriptGlobalFloat.hpp processors/object/ProcessorVideoPlay.hpp
|
2017-04-23 05:59:17 +00:00
|
|
|
)
|
|
|
|
|
2018-05-18 02:06:19 +00:00
|
|
|
source_group(tes3mp-server\\processors\\object FILES ${PROCESSORS_OBJECT})
|
2017-04-23 05:59:17 +00:00
|
|
|
|
2018-05-23 04:48:28 +00:00
|
|
|
set(PROCESSORS_WORLDSTATE
|
2018-06-07 09:49:12 +00:00
|
|
|
processors/worldstate/ProcessorRecordDynamic.hpp processors/worldstate/ProcessorWorldMap.hpp
|
2018-05-23 04:48:28 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
source_group(tes3mp-server\\processors\\worldstate FILES ${PROCESSORS_WORLDSTATE})
|
|
|
|
|
2017-07-03 17:13:10 +00:00
|
|
|
set(PROCESSORS
|
|
|
|
processors/ProcessorInitializer.cpp
|
|
|
|
processors/PlayerProcessor.cpp
|
|
|
|
processors/ActorProcessor.cpp
|
2018-05-15 19:07:06 +00:00
|
|
|
processors/ObjectProcessor.cpp
|
2018-05-18 03:40:28 +00:00
|
|
|
processors/WorldstateProcessor.cpp
|
2017-07-03 17:13:10 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
source_group(tes3mp-server\\processors FILES ${PROCESSORS})
|
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
include_directories("./")
|
|
|
|
|
|
|
|
# Main executable
|
|
|
|
|
2016-08-19 01:38:33 +00:00
|
|
|
add_executable(tes3mp-server
|
2017-04-23 05:59:17 +00:00
|
|
|
${SERVER} ${SERVER_HEADER}
|
2018-06-07 09:49:12 +00:00
|
|
|
${PROCESSORS_ACTOR} ${PROCESSORS_PLAYER} ${PROCESSORS_OBJECT} ${PROCESSORS_WORLDSTATE} ${PROCESSORS}
|
2017-04-23 05:59:17 +00:00
|
|
|
${APPLE_BUNDLE_RESOURCES}
|
|
|
|
)
|
2017-08-27 16:15:56 +00:00
|
|
|
|
2017-09-15 05:19:15 +00:00
|
|
|
# For Lua debugging
|
|
|
|
target_compile_definitions(tes3mp-server PRIVATE $<$<CONFIG:Debug>:SOL_SAFE_FUNCTIONS> $<$<CONFIG:RelWithDebInfo>:SOL_SAFE_FUNCTIONS>)
|
2017-11-01 16:09:25 +00:00
|
|
|
target_compile_definitions(tes3mp-server PRIVATE $<$<CONFIG:Debug>:SOL_SAFE_USERTYPE> $<$<CONFIG:RelWithDebInfo>:SOL_SAFE_USERTYPE>)
|
2017-09-15 05:19:15 +00:00
|
|
|
target_compile_definitions(tes3mp-server PRIVATE $<$<CONFIG:Debug>:SERVER_DEBUG> $<$<CONFIG:RelWithDebInfo>:SERVER_DEBUG>)
|
2017-08-27 16:15:56 +00:00
|
|
|
|
2018-02-16 08:31:45 +00:00
|
|
|
set_property(TARGET tes3mp-server PROPERTY CXX_STANDARD 14)
|
2017-08-27 16:15:56 +00:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
2018-02-16 08:31:45 +00:00
|
|
|
target_compile_options(tes3mp-server PRIVATE -Wno-ignored-qualifiers -ftemplate-depth=2048)
|
2017-08-27 16:15:56 +00:00
|
|
|
endif()
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2016-08-19 01:38:33 +00:00
|
|
|
target_link_libraries(tes3mp-server
|
2016-07-23 18:30:07 +00:00
|
|
|
#${Boost_SYSTEM_LIBRARY}
|
|
|
|
#${Boost_THREAD_LIBRARY}
|
|
|
|
#${Boost_FILESYSTEM_LIBRARY}
|
|
|
|
#${Boost_PROGRAM_OPTIONS_LIBRARY}
|
2016-01-12 03:41:44 +00:00
|
|
|
${RakNet_LIBRARY}
|
|
|
|
components
|
2018-01-05 02:40:17 +00:00
|
|
|
${LuaJit_LIBRARIES}
|
2016-10-23 09:07:46 +00:00
|
|
|
${Breakpad_Library}
|
2016-01-12 03:41:44 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if (UNIX)
|
2016-08-19 01:38:33 +00:00
|
|
|
target_link_libraries(tes3mp-server dl)
|
2016-01-12 03:41:44 +00:00
|
|
|
# Fix for not visible pthreads functions for linker with glibc 2.15
|
|
|
|
if(NOT APPLE)
|
2016-08-19 01:38:33 +00:00
|
|
|
target_link_libraries(tes3mp-server ${CMAKE_THREAD_LIBS_INIT})
|
2016-01-12 03:41:44 +00:00
|
|
|
endif(NOT APPLE)
|
|
|
|
endif(UNIX)
|
|
|
|
|
|
|
|
if (BUILD_WITH_CODE_COVERAGE)
|
|
|
|
add_definitions (--coverage)
|
2016-08-19 01:38:33 +00:00
|
|
|
target_link_libraries(tes3mp-server gcov)
|
2016-01-12 03:41:44 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (MSVC)
|
|
|
|
# Debug version needs increased number of sections beyond 2^16
|
|
|
|
if (CMAKE_CL_64)
|
|
|
|
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /bigobj")
|
|
|
|
endif (CMAKE_CL_64)
|
|
|
|
add_definitions("-D_USE_MATH_DEFINES")
|
|
|
|
endif (MSVC)
|