1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 13:49:56 +00:00
openmw-tes3mp/components/CMakeLists.txt

438 lines
15 KiB
Text
Raw Normal View History

2011-11-06 08:30:15 +00:00
project (Components)
# Version file
set (VERSION_IN_FILE "${OpenMW_SOURCE_DIR}/files/version.in")
set (VERSION_FILE_PATH_BASE "${OpenMW_BINARY_DIR}")
set (VERSION_FILE_PATH_RELATIVE resources/version)
if (GIT_CHECKOUT)
get_generator_is_multi_config(multi_config)
add_custom_target (git-version
COMMAND ${CMAKE_COMMAND}
-DGIT_EXECUTABLE=${GIT_EXECUTABLE}
-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
-DVERSION_IN_FILE=${VERSION_IN_FILE}
-DVERSION_FILE_PATH_BASE=${VERSION_FILE_PATH_BASE}
-DVERSION_FILE_PATH_RELATIVE=${VERSION_FILE_PATH_RELATIVE}
-DOPENMW_VERSION_MAJOR=${OPENMW_VERSION_MAJOR}
-DOPENMW_VERSION_MINOR=${OPENMW_VERSION_MINOR}
-DOPENMW_VERSION_RELEASE=${OPENMW_VERSION_RELEASE}
-DOPENMW_VERSION=${OPENMW_VERSION}
2017-10-24 22:31:40 +00:00
-DMACROSFILE=${CMAKE_SOURCE_DIR}/cmake/OpenMWMacros.cmake
"-DCMAKE_CONFIGURATION_TYPES=${CMAKE_CONFIGURATION_TYPES}"
-Dgenerator_is_multi_config_var=${multi_config}
-P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GitVersion.cmake
VERBATIM)
else (GIT_CHECKOUT)
configure_resource_file(${VERSION_IN_FILE} ${VERSION_FILE_PATH_BASE} ${VERSION_FILE_PATH_RELATIVE})
endif (GIT_CHECKOUT)
2011-11-06 08:30:15 +00:00
# source files
2012-03-30 16:38:33 +00:00
add_component_dir (settings
settings parser
2012-03-30 16:38:33 +00:00
)
# Start of tes3mp change
#
# Don't include certain components in server-only builds
IF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
2011-11-06 08:30:15 +00:00
add_component_dir (bsa
bsa_file compressedbsafile memorystream
2011-11-06 08:30:15 +00:00
)
add_component_dir (vfs
manager archive bsaarchive filesystemarchive registerarchives
)
2015-03-26 17:02:51 +00:00
add_component_dir (resource
2020-11-18 23:11:56 +00:00
scenemanager keyframemanager imagemanager bulletshapemanager bulletshape niffilemanager objectcache multiobjectcache resourcesystem
resourcemanager stats animation
2015-03-26 17:02:51 +00:00
)
add_component_dir (shader
shadermanager shadervisitor removedalphafunc
)
2015-03-26 17:02:51 +00:00
add_component_dir (sceneutil
clone attach visitor util statesetupdater controller skeleton riggeometry morphgeometry lightcontroller
lightmanager lightutil positionattitudetransform workqueue unrefqueue pathgridutil waterutil writescene serialize optimizer
actorutil detourdebugdraw navmesh agentpath shadow mwshadowtechnique recastmesh shadowsbin osgacontroller rtt
2015-03-26 17:02:51 +00:00
)
2011-11-06 08:30:15 +00:00
add_component_dir (nif
2015-09-24 13:21:42 +00:00
controlled effect niftypes record controller extra node record_ptr data niffile property nifkey base nifstream
2011-11-06 08:30:15 +00:00
)
add_component_dir (nifosg
nifloader controller particle matrixtransform
)
add_component_dir (nifbullet
bulletnifloader
)
# Start of tes3mp change
#
# Don't include certain components in server-only builds
ENDIF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
2011-11-06 08:30:15 +00:00
add_component_dir (to_utf8
to_utf8
)
add_component_dir (esm
attr defs esmcommon esmreader esmwriter loadacti loadalch loadappa loadarmo loadbody loadbook loadbsgn loadcell
2015-01-19 12:16:12 +00:00
loadclas loadclot loadcont loadcrea loaddial loaddoor loadench loadfact loadglob loadgmst
loadinfo loadingr loadland loadlevlist loadligh loadlock loadprob loadrepa loadltex loadmgef loadmisc
2011-11-06 08:30:15 +00:00
loadnpc loadpgrd loadrace loadregn loadscpt loadskil loadsndg loadsoun loadspel loadsscr loadstat
loadweap records aipackage effectlist spelllist variant variantimp loadtes3 cellref filter
savedgame journalentry queststate locals globalscript player objectstate cellid cellstate globalmap inventorystate containerstate npcstate creaturestate dialoguestate statstate
2014-08-03 08:12:03 +00:00
npcstats creaturestats weatherstate quickkeys fogstate spellstate activespells creaturelevliststate doorstate projectilestate debugprofile
2018-07-14 02:48:59 +00:00
aisequence magiceffects util custommarkerstate stolenitems transport animationstate controlsstate mappings
2011-11-06 08:30:15 +00:00
)
# Start of tes3mp change
#
# Don't include certain components in server-only builds
IF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
add_component_dir (esmterrain
storage
2011-11-06 08:30:15 +00:00
)
# Start of tes3mp change
#
# Don't include certain components in server-only builds
ENDIF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
2011-11-06 08:30:15 +00:00
add_component_dir (misc
constants utf8stream stringops resourcehelpers rng messageformatparser weakcache stereo callbackmanager thread
)
add_component_dir (debug
2018-10-26 14:18:38 +00:00
debugging debuglog gldebug
2011-11-06 08:30:15 +00:00
)
IF(NOT WIN32 AND NOT APPLE)
add_definitions(-DGLOBAL_DATA_PATH="${GLOBAL_DATA_PATH}")
add_definitions(-DGLOBAL_CONFIG_PATH="${GLOBAL_CONFIG_PATH}")
ENDIF()
2011-11-06 08:30:15 +00:00
add_component_dir (files
linuxpath androidpath windowspath macospath fixedpath multidircollection collections configurationmanager escape
2015-05-28 00:34:38 +00:00
lowlevelfile constrainedfilestream memorystream
2011-11-06 08:30:15 +00:00
)
add_component_dir (compiler
context controlparser errorhandler exception exprparser extensions fileparser generator
lineparser literals locals output parser scanner scriptparser skipparser streamerrorhandler
2014-02-10 12:01:52 +00:00
stringparser tokenloc nullerrorhandler opcodes extensions0 declarationparser
quickfileparser discardparser junkparser
2011-11-06 08:30:15 +00:00
)
add_component_dir (interpreter
context controlopcodes genericopcodes installopcodes interpreter localopcodes mathopcodes
miscopcodes opcodes runtime types defines
2011-11-06 08:30:15 +00:00
)
add_component_dir (translation
translation
2012-12-23 19:23:24 +00:00
)
# Start of tes3mp addition
#
# Don't include certain components in server-only builds
IF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
add_component_dir (terrain
2018-06-12 23:48:31 +00:00
storage world buffercache defs terraingrid material terraindrawable texturemanager chunkmanager compositemaprenderer quadtreeworld quadtreenode viewdata cellborder
)
add_component_dir (loadinglistener
loadinglistener
)
2015-04-30 23:15:25 +00:00
add_component_dir (myguiplatform
myguirendermanager myguidatamanager myguiplatform myguitexture myguiloglistener additivelayer scalinglayer
2015-04-30 23:15:25 +00:00
)
add_component_dir (widgets
box fontwrapper imagebutton tags list numericeditbox sharedstatebutton virtualkeyboardmanager windowcaption widgets
)
add_component_dir (fontloader
fontloader
)
add_component_dir (sdlutil
gl4es_init sdlgraphicswindow imagetosurface sdlinputwrapper sdlvideowrapper events sdlcursormanager
)
# Start of tes3mp change
#
# Don't include certain components in server-only builds
ENDIF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
add_component_dir (version
version
)
add_component_dir (openmw-mp
TimedLog Utils ErrorMessages NetworkMessages Version
)
2017-05-25 15:56:22 +00:00
add_component_dir (openmw-mp/Base
BaseActor BaseObject BasePacketProcessor BasePlayer BaseStructs BaseSystem BaseWorldstate
)
2017-05-25 15:56:22 +00:00
add_component_dir (openmw-mp/Controllers
SystemPacketController PlayerPacketController ActorPacketController ObjectPacketController WorldstatePacketController
)
2017-05-25 15:56:22 +00:00
add_component_dir(openmw-mp/Master
2017-04-23 05:39:38 +00:00
MasterData PacketMasterQuery PacketMasterUpdate PacketMasterAnnounce BaseMasterPacket ProxyMasterPacket
)
2017-05-25 15:56:22 +00:00
add_component_dir (openmw-mp/Packets
BasePacket PacketPreInit
)
2017-05-25 15:56:22 +00:00
add_component_dir (openmw-mp/Packets/Actor
ActorPacket
PacketActorList PacketActorAuthority PacketActorTest PacketActorAI PacketActorAnimFlags PacketActorAnimPlay
PacketActorAttack PacketActorCast PacketActorCellChange PacketActorDeath PacketActorEquipment PacketActorPosition
PacketActorSpeech PacketActorSpellsActive PacketActorStatsDynamic
)
add_component_dir (openmw-mp/Packets/System
SystemPacket
PacketSystemHandshake
)
2017-05-25 15:56:22 +00:00
add_component_dir (openmw-mp/Packets/Player
PlayerPacket
PacketChatMessage PacketGUIBoxes PacketGameSettings
PacketPlayerBaseInfo PacketPlayerCharGen PacketPlayerAlly PacketPlayerAnimFlags PacketPlayerAnimPlay
PacketPlayerAttack PacketPlayerAttribute PacketPlayerBehavior PacketPlayerBook PacketPlayerBounty
PacketPlayerCast PacketPlayerCellChange PacketPlayerCellState PacketPlayerClass PacketPlayerCooldowns
PacketPlayerDeath PacketPlayerEquipment PacketPlayerFaction PacketPlayerInput PacketPlayerInventory
PacketPlayerItemUse PacketPlayerJail PacketPlayerJournal PacketPlayerLevel PacketPlayerMiscellaneous
PacketPlayerMomentum PacketPlayerPosition PacketPlayerQuickKeys PacketPlayerReputation PacketPlayerRest
PacketPlayerResurrect PacketPlayerShapeshift PacketPlayerSkill PacketPlayerSpeech PacketPlayerSpellbook
PacketPlayerSpellsActive PacketPlayerStatsDynamic PacketPlayerTopic
)
add_component_dir (openmw-mp/Packets/Object
ObjectPacket
PacketDoorDestination PacketDoorState
PacketConsoleCommand PacketContainer PacketObjectActivate PacketObjectAnimPlay PacketObjectAttach
PacketObjectDelete PacketObjectDialogueChoice PacketObjectHit PacketObjectLock PacketObjectMove PacketObjectPlace
PacketObjectRestock PacketObjectRotate PacketObjectScale PacketObjectSound PacketObjectSpawn PacketObjectState
PacketObjectTrap PacketMusicPlay PacketVideoPlay PacketClientScriptLocal PacketScriptMemberShort
PacketObjectMiscellaneous
)
add_component_dir (openmw-mp/Packets/Worldstate
WorldstatePacket
PacketCellCreate PacketCellReset PacketClientScriptGlobal PacketClientScriptSettings PacketRecordDynamic
PacketWorldCollisionOverride PacketWorldDestinationOverride PacketWorldKillCount PacketWorldMap
PacketWorldRegionAuthority PacketWorldTime PacketWorldWeather
)
2016-01-06 11:46:06 +00:00
add_component_dir (fallback
fallback validate
)
# Start of tes3mp change (major)
#
# Don't require the crashcatcher when building on platforms other than Windows or when building only the server,
# as it causes compilation problems
IF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
if(WIN32)
add_component_dir (crashcatcher
windows_crashcatcher
windows_crashmonitor
windows_crashshm
)
endif()
ENDIF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change (major)
# Start of tes3mp change (major)
#
# Don't require the DetourNavigator when building the server
IF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
add_component_dir(detournavigator
debug
makenavmesh
findsmoothpath
recastmeshbuilder
recastmeshmanager
cachedrecastmeshmanager
navmeshmanager
navigatorimpl
asyncnavmeshupdater
recastmesh
tilecachedrecastmeshmanager
recastmeshobject
navmeshtilescache
settings
navigator
findrandompointaroundcircle
raycast
navmeshtileview
oscillatingrecastmeshobject
offmeshconnectionsmanager
)
ENDIF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change (major)
2018-03-13 22:49:08 +00:00
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
)
# Start of tes3mp change (major)
#
# Don't require Qt when building the server
IF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
2015-12-03 05:54:14 +00:00
if (USE_QT)
2015-12-02 19:40:04 +00:00
add_component_qt_dir (contentselector
model/modelitem model/esmfile
model/naturalsort model/contentmodel
model/loadordererror
view/combobox view/contentselector
)
add_component_qt_dir (config
gamesettings
launchersettings
settingsbase
)
add_component_qt_dir (process
processinvoker
)
add_component_dir (misc
helpviewer
)
QT5_WRAP_UI(ESM_UI_HDR ${ESM_UI})
QT5_WRAP_CPP(MOC_SRCS ${COMPONENT_MOC_FILES})
endif()
# Start of tes3mp change (major)
#
# Don't require Qt when building the server
ENDIF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
2013-01-27 21:40:38 +00:00
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND NOT APPLE)
add_definitions(-fPIC)
endif()
endif ()
include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
2011-11-06 08:30:15 +00:00
add_library(components STATIC ${COMPONENT_FILES} ${MOC_SRCS} ${ESM_UI_HDR})
2012-01-28 00:36:17 +00:00
# Start of tes3mp change (major)
#
# Don't require graphics related libs when building the server
IF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
2016-05-03 02:09:48 +00:00
target_link_libraries(components
# CMake's built-in OSG finder does not use pkgconfig, so we have to
# manually ensure the order is correct for inter-library dependencies.
# This only makes a difference with `-DOPENMW_USE_SYSTEM_OSG=ON -DOSG_STATIC=ON`.
# https://gitlab.kitware.com/cmake/cmake/-/issues/21701
2015-12-03 05:54:14 +00:00
${OSGPARTICLE_LIBRARIES}
${OSGVIEWER_LIBRARIES}
${OSGSHADOW_LIBRARIES}
2015-12-03 05:54:14 +00:00
${OSGANIMATION_LIBRARIES}
${OSGGA_LIBRARIES}
${OSGTEXT_LIBRARIES}
${OSGDB_LIBRARIES}
${OSGUTIL_LIBRARIES}
${OSG_LIBRARIES}
${OPENTHREADS_LIBRARIES}
${SDL2_LIBRARIES}
${OPENGL_gl_LIBRARY}
2016-06-12 20:34:53 +00:00
${MyGUI_LIBRARIES}
2020-10-19 19:36:02 +00:00
LZ4::LZ4
2015-12-03 05:54:14 +00:00
)
ENDIF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
target_link_libraries(components
${Boost_SYSTEM_LIBRARY}
${Boost_FILESYSTEM_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
${Boost_IOSTREAMS_LIBRARY}
)
# End of tes3mp change (major)
2015-12-03 05:54:14 +00:00
# Start of tes3mp change (major)
#
# Don't require RecastNavigation nor Bullet when building the server
IF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
target_link_libraries(components
RecastNavigation::DebugUtils
RecastNavigation::Detour
RecastNavigation::Recast
${BULLET_LIBRARIES}
)
ENDIF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
target_link_libraries(components Base64)
# End of tes3mp change (major)
if (WIN32)
target_link_libraries(components
2019-01-16 19:59:07 +00:00
${Boost_LOCALE_LIBRARY}
${Boost_ZLIB_LIBRARY})
endif()
# Start of tes3mp change (major)
#
# Don't require Qt when building the server
IF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
2015-12-03 05:54:14 +00:00
if (USE_QT)
target_link_libraries(components Qt5::Widgets Qt5::Core)
endif()
# Start of tes3mp change (major)
#
# Don't require Qt when building the server
ENDIF (BUILD_OPENMW OR BUILD_OPENCS OR BUILD_OPENMW_VR)
# End of tes3mp change
if (GIT_CHECKOUT)
add_dependencies (components git-version)
endif (GIT_CHECKOUT)
if (WIN32)
2015-07-19 14:37:20 +00:00
target_link_libraries(components shlwapi)
endif()
# Fix for not visible pthreads functions for linker with glibc 2.15
if (UNIX AND NOT APPLE)
target_link_libraries(components ${CMAKE_THREAD_LIBS_INIT})
endif()
if (BUILD_WITH_CODE_COVERAGE)
add_definitions(--coverage)
target_link_libraries(components gcov)
endif()
2012-01-28 00:36:17 +00:00
# Make the variable accessible for other subdirectories
set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE)
target_compile_definitions(components PUBLIC BT_USE_DOUBLE_PRECISION)