2011-11-06 08:30:15 +00:00
|
|
|
project (Components)
|
2014-01-22 16:33:55 +00:00
|
|
|
|
|
|
|
# Version file
|
2015-07-18 01:01:06 +00:00
|
|
|
set (VERSION_IN_FILE "${OpenMW_SOURCE_DIR}/files/version.in")
|
2017-10-11 20:58:55 +00:00
|
|
|
set (VERSION_FILE_PATH_BASE "${OpenMW_BINARY_DIR}")
|
|
|
|
set (VERSION_FILE_PATH_RELATIVE resources/version)
|
2014-12-30 21:37:33 +00:00
|
|
|
if (GIT_CHECKOUT)
|
2017-10-24 22:29:18 +00:00
|
|
|
get_generator_is_multi_config(multi_config)
|
|
|
|
add_custom_target (git-version
|
2015-07-18 01:01:06 +00:00
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
|
|
-DGIT_EXECUTABLE=${GIT_EXECUTABLE}
|
2014-12-30 21:37:33 +00:00
|
|
|
-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
|
2015-07-18 01:01:06 +00:00
|
|
|
-DVERSION_IN_FILE=${VERSION_IN_FILE}
|
2017-10-11 20:58:55 +00:00
|
|
|
-DVERSION_FILE_PATH_BASE=${VERSION_FILE_PATH_BASE}
|
|
|
|
-DVERSION_FILE_PATH_RELATIVE=${VERSION_FILE_PATH_RELATIVE}
|
2015-07-18 01:01:06 +00:00
|
|
|
-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}
|
2014-12-30 21:37:33 +00:00
|
|
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GitVersion.cmake
|
2015-07-18 01:01:06 +00:00
|
|
|
VERBATIM)
|
2014-12-30 21:37:33 +00:00
|
|
|
else (GIT_CHECKOUT)
|
2017-10-11 20:58:55 +00:00
|
|
|
configure_resource_file(${VERSION_IN_FILE} ${VERSION_FILE_PATH_BASE} ${VERSION_FILE_PATH_RELATIVE})
|
2014-12-30 21:37:33 +00:00
|
|
|
endif (GIT_CHECKOUT)
|
2014-01-22 16:33:55 +00:00
|
|
|
|
2011-11-06 08:30:15 +00:00
|
|
|
# source files
|
|
|
|
|
2021-01-12 22:17:48 +00:00
|
|
|
add_component_dir (lua
|
2022-04-10 07:57:02 +00:00
|
|
|
luastate scriptscontainer utilpackage serialization configuration l10n storage
|
|
|
|
)
|
|
|
|
|
|
|
|
add_component_dir (l10n
|
|
|
|
messagebundles
|
2021-01-12 22:17:48 +00:00
|
|
|
)
|
|
|
|
|
2012-03-30 16:38:33 +00:00
|
|
|
add_component_dir (settings
|
2019-09-29 14:16:19 +00:00
|
|
|
settings parser
|
2012-03-30 16:38:33 +00:00
|
|
|
)
|
|
|
|
|
2011-11-06 08:30:15 +00:00
|
|
|
add_component_dir (bsa
|
2021-11-20 10:11:12 +00:00
|
|
|
bsa_file compressedbsafile
|
2011-11-06 08:30:15 +00:00
|
|
|
)
|
|
|
|
|
2015-03-17 20:59:39 +00:00
|
|
|
add_component_dir (vfs
|
2015-03-19 16:49:41 +00:00
|
|
|
manager archive bsaarchive filesystemarchive registerarchives
|
2015-03-17 20:59:39 +00:00
|
|
|
)
|
|
|
|
|
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
|
2022-09-12 13:03:34 +00:00
|
|
|
resourcemanager stats animation foreachbulletobject errormarker
|
2015-03-26 17:02:51 +00:00
|
|
|
)
|
|
|
|
|
2016-02-16 17:18:48 +00:00
|
|
|
add_component_dir (shader
|
2020-12-16 23:44:15 +00:00
|
|
|
shadermanager shadervisitor removedalphafunc
|
2016-02-16 17:18:48 +00:00
|
|
|
)
|
|
|
|
|
2015-03-26 17:02:51 +00:00
|
|
|
add_component_dir (sceneutil
|
2017-09-01 20:56:09 +00:00
|
|
|
clone attach visitor util statesetupdater controller skeleton riggeometry morphgeometry lightcontroller
|
2021-10-22 23:33:10 +00:00
|
|
|
lightmanager lightutil positionattitudetransform workqueue pathgridutil waterutil writescene serialize optimizer
|
2021-01-24 09:34:33 +00:00
|
|
|
actorutil detourdebugdraw navmesh agentpath shadow mwshadowtechnique recastmesh shadowsbin osgacontroller rtt
|
2022-07-24 18:55:03 +00:00
|
|
|
screencapture depth color riggeometryosgaextension extradata unrefqueue
|
2015-03-26 17:02:51 +00:00
|
|
|
)
|
|
|
|
|
2011-11-06 08:30:15 +00:00
|
|
|
add_component_dir (nif
|
2021-11-10 16:31:28 +00:00
|
|
|
controlled effect niftypes record controller extra node record_ptr data niffile property nifkey base nifstream physics
|
2011-11-06 08:30:15 +00:00
|
|
|
)
|
|
|
|
|
2015-02-23 20:06:10 +00:00
|
|
|
add_component_dir (nifosg
|
2020-06-30 20:27:46 +00:00
|
|
|
nifloader controller particle matrixtransform
|
2015-02-23 20:06:10 +00:00
|
|
|
)
|
|
|
|
|
2015-05-12 01:02:15 +00:00
|
|
|
add_component_dir (nifbullet
|
2015-11-16 22:30:10 +00:00
|
|
|
bulletnifloader
|
2015-05-12 01:02:15 +00:00
|
|
|
)
|
2011-11-06 08:30:15 +00:00
|
|
|
|
|
|
|
add_component_dir (to_utf8
|
|
|
|
to_utf8
|
|
|
|
)
|
|
|
|
|
2022-09-09 19:47:20 +00:00
|
|
|
add_component_dir(esm attr common defs esmcommon records util luascripts format)
|
2022-01-22 14:58:41 +00:00
|
|
|
|
2022-05-14 01:58:00 +00:00
|
|
|
add_component_dir(fx pass technique lexer widgets stateupdater)
|
|
|
|
|
|
|
|
add_component_dir(std140 ubo)
|
|
|
|
|
2022-01-22 14:58:41 +00:00
|
|
|
add_component_dir (esm3
|
|
|
|
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
|
2015-01-25 00:53:20 +00:00
|
|
|
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
|
2022-01-22 14:58:41 +00:00
|
|
|
loadweap aipackage effectlist spelllist variant variantimp loadtes3 cellref filter
|
|
|
|
savedgame journalentry queststate locals globalscript player objectstate cellid cellstate globalmap
|
|
|
|
inventorystate containerstate npcstate creaturestate dialoguestate statstate npcstats creaturestats
|
|
|
|
weatherstate quickkeys fogstate spellstate activespells creaturelevliststate doorstate projectilestate debugprofile
|
2022-06-01 20:53:18 +00:00
|
|
|
aisequence magiceffects custommarkerstate stolenitems transport animationstate controlsstate mappings readerscache
|
2011-11-06 08:30:15 +00:00
|
|
|
)
|
|
|
|
|
2022-01-22 22:52:08 +00:00
|
|
|
add_component_dir (esm3terrain
|
2014-08-07 18:31:07 +00:00
|
|
|
storage
|
2011-11-06 08:30:15 +00:00
|
|
|
)
|
|
|
|
|
2022-01-30 10:07:39 +00:00
|
|
|
add_component_dir (esm4
|
2022-02-19 01:49:22 +00:00
|
|
|
acti
|
|
|
|
actor
|
|
|
|
common
|
|
|
|
dialogue
|
|
|
|
effect
|
|
|
|
formid
|
|
|
|
inventory
|
|
|
|
lighting
|
|
|
|
loadachr
|
|
|
|
loadacre
|
|
|
|
loadacti
|
|
|
|
loadalch
|
|
|
|
loadaloc
|
|
|
|
loadammo
|
|
|
|
loadanio
|
|
|
|
loadappa
|
|
|
|
loadarma
|
|
|
|
loadarmo
|
|
|
|
loadaspc
|
|
|
|
loadbook
|
|
|
|
loadbptd
|
|
|
|
loadcell
|
|
|
|
loadclas
|
|
|
|
loadclfm
|
|
|
|
loadclot
|
|
|
|
loadcont
|
|
|
|
loadcrea
|
|
|
|
loaddial
|
|
|
|
loaddobj
|
|
|
|
loaddoor
|
|
|
|
loadeyes
|
|
|
|
loadflor
|
|
|
|
loadflst
|
|
|
|
loadfurn
|
|
|
|
loadglob
|
|
|
|
loadgras
|
|
|
|
loadgrup
|
|
|
|
loadhair
|
|
|
|
loadhdpt
|
|
|
|
loadidle
|
|
|
|
loadidlm
|
|
|
|
loadimod
|
|
|
|
loadinfo
|
|
|
|
loadingr
|
|
|
|
loadkeym
|
|
|
|
loadland
|
|
|
|
loadlgtm
|
|
|
|
loadligh
|
|
|
|
loadltex
|
|
|
|
loadlvlc
|
|
|
|
loadlvli
|
|
|
|
loadlvln
|
|
|
|
loadmato
|
|
|
|
loadmisc
|
|
|
|
loadmset
|
|
|
|
loadmstt
|
|
|
|
loadmusc
|
|
|
|
loadnavi
|
|
|
|
loadnavm
|
|
|
|
loadnote
|
|
|
|
loadnpc
|
|
|
|
loadotft
|
|
|
|
loadpack
|
|
|
|
loadpgrd
|
|
|
|
loadpgre
|
|
|
|
loadpwat
|
|
|
|
loadqust
|
|
|
|
loadrace
|
|
|
|
loadrefr
|
|
|
|
loadregn
|
|
|
|
loadroad
|
|
|
|
loadsbsp
|
|
|
|
loadscol
|
|
|
|
loadscpt
|
|
|
|
loadscrl
|
|
|
|
loadsgst
|
|
|
|
loadslgm
|
|
|
|
loadsndr
|
|
|
|
loadsoun
|
|
|
|
loadstat
|
|
|
|
loadtact
|
|
|
|
loadterm
|
|
|
|
loadtes4
|
|
|
|
loadtree
|
|
|
|
loadtxst
|
|
|
|
loadweap
|
|
|
|
loadwrld
|
|
|
|
reader
|
|
|
|
reference
|
|
|
|
script
|
2022-01-30 10:07:39 +00:00
|
|
|
)
|
|
|
|
|
2011-11-06 08:30:15 +00:00
|
|
|
add_component_dir (misc
|
2022-08-02 22:00:54 +00:00
|
|
|
constants utf8stream resourcehelpers rng messageformatparser weakcache thread
|
2022-09-12 13:03:34 +00:00
|
|
|
compression osguservalues color tuplemeta tuplehelpers
|
2018-08-03 09:19:12 +00:00
|
|
|
)
|
|
|
|
|
2022-04-04 20:51:23 +00:00
|
|
|
add_component_dir (stereo
|
|
|
|
frustum multiview stereomanager types
|
|
|
|
)
|
|
|
|
|
2018-08-03 09:19:12 +00:00
|
|
|
add_component_dir (debug
|
2022-08-28 14:26:11 +00:00
|
|
|
debugging debuglog gldebug debugdraw
|
2011-11-06 08:30:15 +00:00
|
|
|
)
|
|
|
|
|
2014-09-22 13:36:42 +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
|
2021-10-17 22:40:34 +00:00
|
|
|
linuxpath androidpath windowspath macospath fixedpath multidircollection collections configurationmanager
|
2022-07-02 22:02:29 +00:00
|
|
|
constrainedfilestream memorystream hash configfileparser openfile constrainedfilestreambuf conversion
|
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
|
2014-12-17 14:03:05 +00:00
|
|
|
quickfileparser discardparser junkparser
|
2011-11-06 08:30:15 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_component_dir (interpreter
|
|
|
|
context controlopcodes genericopcodes installopcodes interpreter localopcodes mathopcodes
|
2020-05-13 19:17:08 +00:00
|
|
|
miscopcodes opcodes runtime types defines
|
2011-11-06 08:30:15 +00:00
|
|
|
)
|
|
|
|
|
2012-12-25 19:20:39 +00:00
|
|
|
add_component_dir (translation
|
|
|
|
translation
|
2012-12-23 19:23:24 +00:00
|
|
|
)
|
2013-11-06 09:21:25 +00:00
|
|
|
|
2013-08-16 11:01:52 +00:00
|
|
|
add_component_dir (terrain
|
2022-07-18 16:11:37 +00:00
|
|
|
storage world buffercache defs terraingrid material terraindrawable texturemanager chunkmanager compositemaprenderer
|
|
|
|
quadtreeworld quadtreenode viewdata cellborder view heightcull
|
2013-08-16 11:01:52 +00:00
|
|
|
)
|
2013-11-06 09:21:25 +00:00
|
|
|
|
2013-08-27 13:48:13 +00:00
|
|
|
add_component_dir (loadinglistener
|
|
|
|
loadinglistener
|
|
|
|
)
|
2012-12-23 19:23:24 +00:00
|
|
|
|
2015-04-30 23:15:25 +00:00
|
|
|
add_component_dir (myguiplatform
|
2015-11-08 17:21:25 +00:00
|
|
|
myguirendermanager myguidatamanager myguiplatform myguitexture myguiloglistener additivelayer scalinglayer
|
2015-04-30 23:15:25 +00:00
|
|
|
)
|
|
|
|
|
2014-09-12 02:27:23 +00:00
|
|
|
add_component_dir (widgets
|
2018-06-18 09:43:39 +00:00
|
|
|
box fontwrapper imagebutton tags list numericeditbox sharedstatebutton windowcaption widgets
|
2014-09-12 02:27:23 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_component_dir (fontloader
|
|
|
|
fontloader
|
|
|
|
)
|
|
|
|
|
2015-05-13 00:52:04 +00:00
|
|
|
add_component_dir (sdlutil
|
2021-12-04 12:16:38 +00:00
|
|
|
gl4es_init sdlgraphicswindow imagetosurface sdlinputwrapper sdlvideowrapper events sdlcursormanager sdlmappings
|
2015-05-13 00:52:04 +00:00
|
|
|
)
|
|
|
|
|
2014-01-22 16:33:55 +00:00
|
|
|
add_component_dir (version
|
|
|
|
version
|
|
|
|
)
|
2013-10-30 13:04:33 +00:00
|
|
|
|
2016-01-06 11:46:06 +00:00
|
|
|
add_component_dir (fallback
|
|
|
|
fallback validate
|
|
|
|
)
|
|
|
|
|
2021-11-18 15:19:54 +00:00
|
|
|
add_component_dir (lua_ui
|
2022-01-29 22:43:08 +00:00
|
|
|
registerscriptsettings scriptsettings
|
2022-02-07 22:37:08 +00:00
|
|
|
properties widget element util layers content alignment resources
|
2022-04-04 21:10:03 +00:00
|
|
|
adapter text textedit window image container flex
|
2021-11-18 15:19:54 +00:00
|
|
|
)
|
|
|
|
|
2021-04-26 21:20:16 +00:00
|
|
|
|
2020-12-12 16:29:29 +00:00
|
|
|
if(WIN32)
|
|
|
|
add_component_dir (crashcatcher
|
|
|
|
windows_crashcatcher
|
|
|
|
windows_crashmonitor
|
|
|
|
windows_crashshm
|
|
|
|
)
|
|
|
|
elseif(NOT ANDROID)
|
2018-07-05 20:55:19 +00:00
|
|
|
add_component_dir (crashcatcher
|
|
|
|
crashcatcher
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-03-13 22:49:08 +00:00
|
|
|
add_component_dir(detournavigator
|
|
|
|
debug
|
|
|
|
makenavmesh
|
|
|
|
findsmoothpath
|
|
|
|
recastmeshbuilder
|
|
|
|
navmeshmanager
|
2019-02-16 12:27:02 +00:00
|
|
|
navigatorimpl
|
2018-03-13 22:49:08 +00:00
|
|
|
asyncnavmeshupdater
|
|
|
|
recastmesh
|
2018-04-15 22:07:18 +00:00
|
|
|
tilecachedrecastmeshmanager
|
2018-05-26 14:44:25 +00:00
|
|
|
recastmeshobject
|
2018-09-30 22:33:25 +00:00
|
|
|
navmeshtilescache
|
2019-02-16 11:41:11 +00:00
|
|
|
settings
|
2020-01-20 22:06:47 +00:00
|
|
|
navigator
|
|
|
|
findrandompointaroundcircle
|
2021-02-14 03:07:08 +00:00
|
|
|
raycast
|
2021-04-17 16:48:11 +00:00
|
|
|
navmeshtileview
|
2021-06-27 14:22:30 +00:00
|
|
|
offmeshconnectionsmanager
|
2021-07-13 22:03:10 +00:00
|
|
|
preparednavmeshdata
|
|
|
|
navmeshcacheitem
|
2021-11-05 23:34:06 +00:00
|
|
|
navigatorutils
|
2021-11-04 00:57:27 +00:00
|
|
|
generatenavmeshtile
|
2021-06-29 01:49:21 +00:00
|
|
|
navmeshdb
|
|
|
|
serialization
|
|
|
|
navmeshdbutils
|
2021-07-09 20:51:42 +00:00
|
|
|
recast
|
2022-01-25 14:06:53 +00:00
|
|
|
gettilespositions
|
2022-06-03 22:44:42 +00:00
|
|
|
collisionshapetype
|
2022-08-28 12:52:12 +00:00
|
|
|
stats
|
2022-08-28 14:43:43 +00:00
|
|
|
commulativeaabb
|
2018-03-13 22:49:08 +00:00
|
|
|
)
|
|
|
|
|
2021-09-05 15:43:46 +00:00
|
|
|
add_component_dir(loadinglistener
|
|
|
|
reporter
|
|
|
|
)
|
|
|
|
|
2021-10-16 11:03:15 +00:00
|
|
|
add_component_dir(sqlite3
|
|
|
|
db
|
|
|
|
statement
|
|
|
|
transaction
|
|
|
|
)
|
|
|
|
|
2021-10-16 17:07:55 +00:00
|
|
|
add_component_dir(esmloader
|
|
|
|
load
|
|
|
|
esmdata
|
|
|
|
)
|
|
|
|
|
2021-12-19 21:49:41 +00:00
|
|
|
add_component_dir(navmeshtool
|
|
|
|
protocol
|
|
|
|
)
|
|
|
|
|
2022-06-01 07:34:53 +00:00
|
|
|
add_component_dir(platform
|
|
|
|
platform
|
2022-07-16 17:37:19 +00:00
|
|
|
file
|
2022-06-01 07:34:53 +00:00
|
|
|
)
|
|
|
|
|
2022-07-17 15:40:27 +00:00
|
|
|
if (WIN32)
|
|
|
|
add_component_dir(platform
|
|
|
|
file.win32
|
|
|
|
)
|
|
|
|
elseif (UNIX)
|
|
|
|
add_component_dir(platform
|
|
|
|
file.posix
|
|
|
|
)
|
|
|
|
else ()
|
|
|
|
add_component_dir(platform
|
|
|
|
file.stdio
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2013-10-23 02:52:35 +00:00
|
|
|
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
2013-08-17 03:23:21 +00:00
|
|
|
)
|
2013-11-06 09:21:25 +00:00
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
2021-08-18 23:37:31 +00:00
|
|
|
add_component_qt_dir (misc
|
2020-04-19 17:37:40 +00:00
|
|
|
helpviewer
|
|
|
|
)
|
|
|
|
|
2022-08-19 22:33:51 +00:00
|
|
|
add_component_qt_dir (files
|
|
|
|
qtconversion
|
|
|
|
)
|
|
|
|
|
2020-06-22 10:17:06 +00:00
|
|
|
QT5_WRAP_UI(ESM_UI_HDR ${ESM_UI})
|
2015-06-12 13:10:12 +00:00
|
|
|
endif()
|
2013-01-27 21:40:38 +00:00
|
|
|
|
2014-09-11 21:12: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 ()
|
|
|
|
|
2020-07-10 13:01:44 +00:00
|
|
|
include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
|
2011-11-06 08:30:15 +00:00
|
|
|
|
2021-10-16 11:03:15 +00:00
|
|
|
find_package(SQLite3 REQUIRED)
|
|
|
|
|
2021-08-18 23:37:31 +00:00
|
|
|
add_library(components STATIC ${COMPONENT_FILES})
|
2012-01-28 00:36:17 +00:00
|
|
|
|
2016-05-03 02:09:48 +00:00
|
|
|
target_link_libraries(components
|
2021-03-06 19:21:23 +00:00
|
|
|
# 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}
|
2017-11-08 04:09:14 +00:00
|
|
|
${OSGSHADOW_LIBRARIES}
|
2015-12-03 05:54:14 +00:00
|
|
|
${OSGANIMATION_LIBRARIES}
|
2021-03-06 19:21:23 +00:00
|
|
|
${OSGGA_LIBRARIES}
|
|
|
|
${OSGTEXT_LIBRARIES}
|
|
|
|
${OSGDB_LIBRARIES}
|
|
|
|
${OSGUTIL_LIBRARIES}
|
|
|
|
${OSG_LIBRARIES}
|
|
|
|
${OPENTHREADS_LIBRARIES}
|
|
|
|
|
|
|
|
${Boost_SYSTEM_LIBRARY}
|
|
|
|
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
|
|
|
${Boost_IOSTREAMS_LIBRARY}
|
|
|
|
|
2016-11-14 06:01:22 +00:00
|
|
|
${SDL2_LIBRARIES}
|
2018-03-27 18:20:40 +00:00
|
|
|
${OPENGL_gl_LIBRARY}
|
2016-06-12 20:34:53 +00:00
|
|
|
${MyGUI_LIBRARIES}
|
2021-12-04 11:32:39 +00:00
|
|
|
${LUA_LIBRARIES}
|
2020-10-19 19:36:02 +00:00
|
|
|
LZ4::LZ4
|
2018-10-31 21:20:10 +00:00
|
|
|
RecastNavigation::DebugUtils
|
|
|
|
RecastNavigation::Detour
|
|
|
|
RecastNavigation::Recast
|
2021-05-17 22:00:23 +00:00
|
|
|
|
|
|
|
Base64
|
2021-10-16 11:03:15 +00:00
|
|
|
SQLite::SQLite3
|
2021-11-15 16:40:22 +00:00
|
|
|
smhasher
|
2022-04-10 07:57:02 +00:00
|
|
|
${ICU_LIBRARIES}
|
|
|
|
yaml-cpp
|
2015-12-03 05:54:14 +00:00
|
|
|
)
|
|
|
|
|
2022-05-22 00:40:03 +00:00
|
|
|
if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.77.0)
|
|
|
|
target_link_libraries(components ${Boost_ATOMIC_LIBRARY})
|
|
|
|
endif()
|
|
|
|
|
2021-05-02 16:13:16 +00:00
|
|
|
target_link_libraries(components ${BULLET_LIBRARIES})
|
2020-12-27 22:16:11 +00:00
|
|
|
|
2015-06-12 13:22:19 +00:00
|
|
|
if (WIN32)
|
|
|
|
target_link_libraries(components
|
2019-01-16 19:59:07 +00:00
|
|
|
${Boost_LOCALE_LIBRARY}
|
|
|
|
${Boost_ZLIB_LIBRARY})
|
2015-06-12 13:22:19 +00:00
|
|
|
endif()
|
|
|
|
|
2015-12-03 05:54:14 +00:00
|
|
|
if (USE_QT)
|
2021-09-07 21:10:18 +00:00
|
|
|
add_library(components_qt STATIC ${COMPONENT_QT_FILES} ${ESM_UI_HDR})
|
2021-08-18 23:37:31 +00:00
|
|
|
target_link_libraries(components_qt components Qt5::Widgets Qt5::Core)
|
|
|
|
target_compile_definitions(components_qt PRIVATE OPENMW_DOC_BASEURL="${OPENMW_DOC_BASEURL}")
|
2015-06-12 13:10:12 +00:00
|
|
|
endif()
|
|
|
|
|
2014-12-30 21:37:33 +00:00
|
|
|
if (GIT_CHECKOUT)
|
|
|
|
add_dependencies (components git-version)
|
|
|
|
endif (GIT_CHECKOUT)
|
|
|
|
|
2021-09-01 23:06:27 +00:00
|
|
|
if (OSG_STATIC AND CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
|
|
find_package(X11 REQUIRED COMPONENTS Xinerama Xrandr)
|
|
|
|
target_link_libraries(components ${CMAKE_DL_LIBS} X11::X11 X11::Xinerama X11::Xrandr)
|
|
|
|
find_package(Fontconfig MODULE)
|
|
|
|
if(Fontconfig_FOUND)
|
|
|
|
target_link_libraries(components Fontconfig::Fontconfig)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2013-06-22 09:33:22 +00:00
|
|
|
if (WIN32)
|
2015-07-19 14:37:20 +00:00
|
|
|
target_link_libraries(components shlwapi)
|
2013-06-22 09:33:22 +00:00
|
|
|
endif()
|
|
|
|
|
2012-07-15 19:27:57 +00:00
|
|
|
# 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()
|
|
|
|
|
2018-07-08 17:27:46 +00:00
|
|
|
if (BUILD_WITH_CODE_COVERAGE)
|
|
|
|
add_definitions(--coverage)
|
|
|
|
target_link_libraries(components gcov)
|
|
|
|
endif()
|
|
|
|
|
2012-07-15 19:27:57 +00:00
|
|
|
|
2012-01-28 00:36:17 +00:00
|
|
|
# Make the variable accessible for other subdirectories
|
|
|
|
set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE)
|
2020-05-15 08:39:04 +00:00
|
|
|
|
2021-05-02 15:48:50 +00:00
|
|
|
target_compile_definitions(components PUBLIC BT_USE_DOUBLE_PRECISION)
|
2021-08-25 18:49:22 +00:00
|
|
|
|
|
|
|
if(OSG_STATIC)
|
|
|
|
unset(_osg_plugins_static_files)
|
|
|
|
add_library(components_osg_plugins INTERFACE)
|
|
|
|
foreach(_plugin ${USED_OSG_PLUGINS})
|
|
|
|
string(TOUPPER ${_plugin} _plugin_uc)
|
|
|
|
if(OPENMW_USE_SYSTEM_OSG)
|
|
|
|
list(APPEND _osg_plugins_static_files ${${_plugin_uc}_LIBRARY})
|
|
|
|
else()
|
|
|
|
list(APPEND _osg_plugins_static_files $<TARGET_FILE:${${_plugin_uc}_LIBRARY}>)
|
|
|
|
target_link_libraries(components_osg_plugins INTERFACE $<TARGET_PROPERTY:${${_plugin_uc}_LIBRARY},LINK_LIBRARIES>)
|
|
|
|
add_dependencies(components_osg_plugins ${${_plugin_uc}_LIBRARY})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
# We use --whole-archive because OSG plugins use registration.
|
|
|
|
get_whole_archive_options(_opts ${_osg_plugins_static_files})
|
|
|
|
target_link_options(components_osg_plugins INTERFACE ${_opts})
|
|
|
|
target_link_libraries(components components_osg_plugins)
|
|
|
|
|
|
|
|
if(OPENMW_USE_SYSTEM_OSG)
|
|
|
|
# OSG plugin pkgconfig files are missing these dependencies.
|
|
|
|
# https://github.com/openscenegraph/OpenSceneGraph/issues/1052
|
2021-09-01 23:06:27 +00:00
|
|
|
find_package(Freetype REQUIRED)
|
|
|
|
find_package(JPEG REQUIRED)
|
|
|
|
find_package(PNG REQUIRED)
|
|
|
|
target_link_libraries(components Freetype::Freetype JPEG::JPEG PNG::PNG)
|
2021-08-25 18:49:22 +00:00
|
|
|
endif()
|
|
|
|
endif(OSG_STATIC)
|
2021-09-07 21:10:18 +00:00
|
|
|
|
|
|
|
if(USE_QT)
|
|
|
|
set_property(TARGET components_qt PROPERTY AUTOMOC ON)
|
|
|
|
endif(USE_QT)
|
2021-12-04 11:32:39 +00:00
|
|
|
|
2022-07-01 14:05:17 +00:00
|
|
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND MSVC)
|
|
|
|
target_precompile_headers(components PUBLIC
|
|
|
|
<sol/sol.hpp>
|
|
|
|
|
|
|
|
<osg/State>
|
|
|
|
<osg/StateSet>
|
|
|
|
<osg/Node>
|
|
|
|
<osg/Drawable>
|
|
|
|
<osg/Camera>
|
|
|
|
|
|
|
|
<MyGUI_Widget.h>
|
|
|
|
|
|
|
|
<boost/filesystem.hpp>
|
|
|
|
|
|
|
|
<algorithm>
|
|
|
|
<filesystem>
|
|
|
|
<fstream>
|
|
|
|
<functional>
|
|
|
|
<memory>
|
|
|
|
<ostream>
|
|
|
|
<string>
|
|
|
|
<vector>
|
|
|
|
)
|
|
|
|
|
|
|
|
target_precompile_headers(components PRIVATE
|
|
|
|
<osgViewer/Viewer>
|
|
|
|
|
|
|
|
<boost/program_options/options_description.hpp>
|
|
|
|
)
|
|
|
|
endif()
|