2011-11-06 09:30:15 +01:00
|
|
|
project (Components)
|
2014-01-22 17:33:55 +01:00
|
|
|
|
|
|
|
# Version file
|
2014-12-30 18:37:33 -03:00
|
|
|
set (VERSION_HPP_IN ${CMAKE_CURRENT_SOURCE_DIR}/version/version.hpp.cmake)
|
|
|
|
set (VERSION_HPP ${CMAKE_CURRENT_SOURCE_DIR}/version/version.hpp)
|
|
|
|
if (GIT_CHECKOUT)
|
|
|
|
add_custom_target (git-version
|
|
|
|
COMMAND ${CMAKE_COMMAND}
|
|
|
|
-DGIT_EXECUTABLE=${GIT_EXECUTABLE}
|
|
|
|
-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
|
|
|
|
-DVERSION_HPP_IN=${VERSION_HPP_IN}
|
|
|
|
-DVERSION_HPP=${VERSION_HPP}
|
|
|
|
-DOPENMW_VERSION_MAJOR=${OPENMW_VERSION_MAJOR}
|
|
|
|
-DOPENMW_VERSION_MINOR=${OPENMW_VERSION_MINOR}
|
|
|
|
-DOPENMW_VERSION_RELEASE=${OPENMW_VERSION_RELEASE}
|
|
|
|
-DOPENMW_VERSION=${OPENMW_VERSION}
|
|
|
|
-P ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/GitVersion.cmake
|
|
|
|
VERBATIM)
|
|
|
|
else (GIT_CHECKOUT)
|
|
|
|
configure_file(${VERSION_HPP_IN} ${VERSION_HPP})
|
|
|
|
endif (GIT_CHECKOUT)
|
2014-01-22 17:33:55 +01:00
|
|
|
|
2015-05-01 01:15:25 +02:00
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
|
2011-11-06 09:30:15 +01:00
|
|
|
# source files
|
|
|
|
|
2012-03-30 18:38:33 +02:00
|
|
|
add_component_dir (settings
|
|
|
|
settings
|
|
|
|
)
|
|
|
|
|
2011-11-06 09:30:15 +01:00
|
|
|
add_component_dir (bsa
|
2015-02-17 17:08:55 +01:00
|
|
|
bsa_file
|
2011-11-06 09:30:15 +01:00
|
|
|
)
|
|
|
|
|
2015-03-17 21:59:39 +01:00
|
|
|
add_component_dir (vfs
|
2015-03-19 17:49:41 +01:00
|
|
|
manager archive bsaarchive filesystemarchive registerarchives
|
2015-03-17 21:59:39 +01:00
|
|
|
)
|
|
|
|
|
2015-03-26 18:02:51 +01:00
|
|
|
add_component_dir (resource
|
2015-03-28 02:20:20 +01:00
|
|
|
scenemanager texturemanager resourcesystem
|
2015-03-26 18:02:51 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
add_component_dir (sceneutil
|
2015-04-22 17:34:39 +02:00
|
|
|
clone attach lightmanager visitor util statesetupdater controller skeleton riggeometry lightcontroller
|
2015-03-26 18:02:51 +01:00
|
|
|
)
|
|
|
|
|
2011-11-06 09:30:15 +01:00
|
|
|
add_component_dir (nif
|
2014-10-28 03:12:36 -04:00
|
|
|
controlled effect niftypes record controller extra node record_ptr data niffile property nifkey data node base nifstream
|
2011-11-06 09:30:15 +01:00
|
|
|
)
|
|
|
|
|
2015-02-23 21:06:10 +01:00
|
|
|
add_component_dir (nifosg
|
2015-04-21 20:30:48 +02:00
|
|
|
nifloader controller particle userdata
|
2015-02-23 21:06:10 +01:00
|
|
|
)
|
|
|
|
|
2015-05-12 03:02:15 +02:00
|
|
|
add_component_dir (nifbullet
|
|
|
|
bulletnifloader bulletshapemanager
|
|
|
|
)
|
2011-11-06 09:30:15 +01:00
|
|
|
|
|
|
|
add_component_dir (to_utf8
|
|
|
|
to_utf8
|
|
|
|
)
|
|
|
|
|
|
|
|
add_component_dir (esm
|
2012-09-23 22:41:41 +04:00
|
|
|
attr defs esmcommon esmreader esmwriter loadacti loadalch loadappa loadarmo loadbody loadbook loadbsgn loadcell
|
2015-01-19 13:16:12 +01:00
|
|
|
loadclas loadclot loadcont loadcrea loaddial loaddoor loadench loadfact loadglob loadgmst
|
2015-01-25 01:53:20 +01:00
|
|
|
loadinfo loadingr loadland loadlevlist loadligh loadlock loadprob loadrepa loadltex loadmgef loadmisc
|
2011-11-06 09:30:15 +01:00
|
|
|
loadnpc loadpgrd loadrace loadregn loadscpt loadskil loadsndg loadsoun loadspel loadsscr loadstat
|
2013-07-22 20:50:04 +02:00
|
|
|
loadweap records aipackage effectlist spelllist variant variantimp loadtes3 cellref filter
|
2015-01-19 10:34:49 +01:00
|
|
|
savedgame journalentry queststate locals globalscript player objectstate cellid cellstate globalmap inventorystate containerstate npcstate creaturestate dialoguestate statstate
|
2014-08-03 10:12:03 +02:00
|
|
|
npcstats creaturestats weatherstate quickkeys fogstate spellstate activespells creaturelevliststate doorstate projectilestate debugprofile
|
2015-03-08 20:44:41 +01:00
|
|
|
aisequence magiceffects util custommarkerstate stolenitems transport
|
2011-11-06 09:30:15 +01:00
|
|
|
)
|
|
|
|
|
2014-08-07 20:31:07 +02:00
|
|
|
add_component_dir (esmterrain
|
|
|
|
storage
|
2011-11-06 09:30:15 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
add_component_dir (misc
|
2015-04-22 17:58:55 +02:00
|
|
|
utf8stream stringops resourcehelpers rng
|
2011-11-06 09:30:15 +01:00
|
|
|
)
|
|
|
|
|
2014-09-22 15:36:42 +02: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 09:30:15 +01:00
|
|
|
add_component_dir (files
|
2014-08-06 07:48:16 +04:00
|
|
|
linuxpath androidpath windowspath macospath fixedpath multidircollection collections configurationmanager
|
2015-02-22 14:19:00 +01:00
|
|
|
lowlevelfile constrainedfilestream
|
2011-11-06 09:30:15 +01: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 13:01:52 +01:00
|
|
|
stringparser tokenloc nullerrorhandler opcodes extensions0 declarationparser
|
2014-12-17 15:03:05 +01:00
|
|
|
quickfileparser discardparser junkparser
|
2011-11-06 09:30:15 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
add_component_dir (interpreter
|
|
|
|
context controlopcodes genericopcodes installopcodes interpreter localopcodes mathopcodes
|
2012-12-20 23:16:34 +00:00
|
|
|
miscopcodes opcodes runtime scriptopcodes spatialopcodes types defines
|
2011-11-06 09:30:15 +01:00
|
|
|
)
|
|
|
|
|
2012-12-25 23:20:39 +04:00
|
|
|
add_component_dir (translation
|
|
|
|
translation
|
2012-12-23 23:23:24 +04:00
|
|
|
)
|
2013-11-06 10:21:25 +01:00
|
|
|
|
2015-03-19 17:21:15 +01:00
|
|
|
#add_definitions(-DTERRAIN_USE_SHADER=1)
|
|
|
|
add_definitions(-DTERRAIN_USE_SHADER=0)
|
2013-08-16 13:01:52 +02:00
|
|
|
add_component_dir (terrain
|
2014-08-07 20:43:33 +02:00
|
|
|
quadtreenode chunk world defaultworld terraingrid storage material buffercache defs
|
2013-08-16 13:01:52 +02:00
|
|
|
)
|
2013-11-06 10:21:25 +01:00
|
|
|
|
2013-08-27 15:48:13 +02:00
|
|
|
add_component_dir (loadinglistener
|
|
|
|
loadinglistener
|
|
|
|
)
|
2012-12-23 23:23:24 +04:00
|
|
|
|
2015-05-01 01:15:25 +02:00
|
|
|
add_component_dir (myguiplatform
|
2015-05-01 02:04:24 +02:00
|
|
|
myguirendermanager myguidatamanager myguiplatform myguitexture myguiloglistener
|
2015-05-01 01:15:25 +02:00
|
|
|
)
|
|
|
|
|
2014-09-12 04:27:23 +02:00
|
|
|
add_component_dir (widgets
|
2015-01-24 19:26:31 +01:00
|
|
|
box imagebutton tags list numericeditbox sharedstatebutton windowcaption widgets
|
2014-09-12 04:27:23 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
add_component_dir (fontloader
|
|
|
|
fontloader
|
|
|
|
)
|
|
|
|
|
2015-05-13 02:52:04 +02:00
|
|
|
add_component_dir (sdlutil
|
2015-05-14 20:31:16 +02:00
|
|
|
sdlgraphicswindow imagetosurface sdlinputwrapper sdlvideowrapper OISCompat events sdlcursormanager
|
2015-05-13 02:52:04 +02:00
|
|
|
)
|
|
|
|
|
2014-01-22 17:33:55 +01:00
|
|
|
add_component_dir (version
|
|
|
|
version
|
|
|
|
)
|
2013-10-30 14:04:33 +01:00
|
|
|
|
2013-10-22 21:52:35 -05:00
|
|
|
set (ESM_UI ${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
|
2013-08-16 22:23:21 -05:00
|
|
|
)
|
2013-11-06 10:21:25 +01:00
|
|
|
|
2013-02-02 16:25:41 +01:00
|
|
|
find_package(Qt4 COMPONENTS QtCore QtGui)
|
2013-01-27 22:40:38 +01:00
|
|
|
|
2013-02-02 16:25:41 +01:00
|
|
|
if(QT_QTGUI_LIBRARY AND QT_QTCORE_LIBRARY)
|
2013-12-25 00:50:25 +01:00
|
|
|
add_component_qt_dir (contentselector
|
2013-09-21 23:06:29 -05:00
|
|
|
model/modelitem model/esmfile
|
|
|
|
model/naturalsort model/contentmodel
|
2014-12-31 19:19:54 +13:00
|
|
|
model/loadordererror
|
2013-10-22 21:52:35 -05:00
|
|
|
view/combobox view/contentselector
|
2013-12-25 00:50:25 +01:00
|
|
|
)
|
|
|
|
add_component_qt_dir (config
|
|
|
|
gamesettings
|
|
|
|
launchersettings
|
|
|
|
settingsbase
|
|
|
|
)
|
2014-12-17 15:03:05 +01:00
|
|
|
|
2014-02-25 15:33:30 +01:00
|
|
|
add_component_qt_dir (process
|
|
|
|
processinvoker
|
|
|
|
)
|
2013-01-27 22:40:38 +01:00
|
|
|
|
2013-02-02 16:25:41 +01:00
|
|
|
include(${QT_USE_FILE})
|
2013-08-16 22:23:21 -05:00
|
|
|
QT4_WRAP_UI(ESM_UI_HDR ${ESM_UI})
|
2013-02-02 16:25:41 +01:00
|
|
|
QT4_WRAP_CPP(MOC_SRCS ${COMPONENT_MOC_FILES})
|
|
|
|
endif(QT_QTGUI_LIBRARY AND QT_QTCORE_LIBRARY)
|
2013-01-27 22:40:38 +01:00
|
|
|
|
2014-09-11 23:12:38 +02: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 ()
|
|
|
|
|
2013-08-16 22:23:21 -05:00
|
|
|
include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
|
2011-11-06 09:30:15 +01:00
|
|
|
|
2013-08-16 22:23:21 -05:00
|
|
|
add_library(components STATIC ${COMPONENT_FILES} ${MOC_SRCS} ${ESM_UI_HDR})
|
2012-01-28 01:36:17 +01:00
|
|
|
|
2015-03-15 14:07:47 +13:00
|
|
|
target_link_libraries(components
|
|
|
|
${Boost_LIBRARIES}
|
|
|
|
${OGRE_LIBRARIES}
|
2015-03-27 17:30:48 +01:00
|
|
|
${OPENSCENEGRAPH_LIBRARIES}
|
2015-05-12 03:02:15 +02:00
|
|
|
${BULLET_LIBRARIES}
|
2015-05-13 02:52:04 +02:00
|
|
|
${SDL2_LIBRARY}
|
2015-05-01 01:15:25 +02:00
|
|
|
# For MyGUI platform
|
|
|
|
${OPENGL_gl_LIBRARY}
|
2015-03-15 14:07:47 +13:00
|
|
|
)
|
2012-01-28 01:36:17 +01:00
|
|
|
|
2014-12-30 18:37:33 -03:00
|
|
|
if (GIT_CHECKOUT)
|
|
|
|
add_dependencies (components git-version)
|
|
|
|
endif (GIT_CHECKOUT)
|
|
|
|
|
2012-07-15 21:27:57 +02: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()
|
|
|
|
|
|
|
|
|
2012-01-28 01:36:17 +01:00
|
|
|
# Make the variable accessible for other subdirectories
|
|
|
|
set(COMPONENT_FILES ${COMPONENT_FILES} PARENT_SCOPE)
|