1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 09:23:53 +00:00
openmw/apps/opencs/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

303 lines
9.2 KiB
Text
Raw Normal View History

set (OPENCS_SRC
${CMAKE_SOURCE_DIR}/files/windows/opencs.rc
2014-09-05 10:30:50 +00:00
)
2012-11-21 16:31:18 +00:00
opencs_units (. editor)
2012-11-22 12:30:02 +00:00
opencs_units (model/doc
document operation saving documentmanager loader runner operationholder
)
opencs_units (model/doc
stage savingstate savingstages blacklist messages
)
opencs_hdrs (model/doc
state
)
2012-12-11 14:35:47 +00:00
opencs_units (model/world
2017-10-02 19:56:22 +00:00
idtable idtableproxymodel regionmap data commanddispatcher idtablebase resourcetable nestedtableproxymodel idtree infotableproxymodel landtexturetableproxymodel
actoradapter idcollection
2012-11-21 16:31:18 +00:00
)
2012-11-22 12:30:02 +00:00
opencs_units (model/world
universalid record commands columnbase columnimp scriptcontext cell refidcollection
refidadapter refiddata refidadapterimp ref collectionbase refcollection columns infocollection tablemimedata cellcoordinates cellselection resources resourcesmanager scope
pathgrid landtexture land nestedtablewrapper nestedcollection nestedcoladapterimp nestedinfocollection
2016-03-08 09:48:44 +00:00
idcompletionmanager metadata defaultgmsts infoselectwrapper commandmacro
)
2012-11-22 12:30:02 +00:00
opencs_hdrs (model/world
columnimp idcollection collection info subcellcollection
2012-11-21 16:31:18 +00:00
)
2012-11-24 10:01:53 +00:00
opencs_units (model/tools
tools reportmodel mergeoperation
)
2012-11-22 12:30:02 +00:00
opencs_units (model/tools
mandatoryid skillcheck classcheck factioncheck racecheck soundcheck regioncheck
birthsigncheck spellcheck referencecheck referenceablecheck scriptcheck bodypartcheck
2015-08-03 16:08:01 +00:00
startscriptcheck search searchoperation searchstage pathgridcheck soundgencheck magiceffectcheck
mergestages gmstcheck topicinfocheck journalcheck enchantmentcheck
)
opencs_hdrs (model/tools
mergestate
)
2012-11-24 10:01:53 +00:00
opencs_units (view/doc
viewmanager view operations operation subview startup filedialog newgame
filewidget adjusterwidget loader globaldebugprofilemenu runlogsubview sizehint
)
2012-12-11 14:35:47 +00:00
opencs_units (view/doc
subviewfactory
2012-11-21 16:31:18 +00:00
)
opencs_hdrs (view/doc
subviewfactoryimp
2012-11-21 16:31:18 +00:00
)
opencs_units (view/world
table tablesubview scriptsubview util regionmapsubview tablebottombox creator genericcreator globalcreator
cellcreator pathgridcreator referenceablecreator startscriptcreator referencecreator scenesubview
infocreator scriptedit dialoguesubview previewsubview regionmap dragrecordtable nestedtable
dialoguespinbox recordbuttonbar tableeditidaction scripterrortable extendedcommandconfigurator
2021-09-19 17:07:54 +00:00
bodypartcreator landtexturecreator landcreator tableheadermouseeventhandler
)
opencs_units (view/world
subviews enumdelegate vartypedelegate recordstatusdelegate idtypedelegate datadisplaydelegate
scripthighlighter idvalidator dialoguecreator idcompletiondelegate
colordelegate dragdroputils
)
opencs_units (view/widget
scenetoolbar scenetool scenetoolmode pushbutton scenetooltoggle scenetoolrun modebutton
2019-09-11 09:59:15 +00:00
scenetooltoggle2 scenetooltexturebrush scenetoolshapebrush completerpopup coloreditor colorpickerpopup droplineedit
)
2013-11-02 01:48:30 +00:00
opencs_units (view/render
scenewidget worldspacewidget pagedworldspacewidget unpagedworldspacewidget
2016-02-16 15:02:29 +00:00
previewwidget editmode instancemode instanceselectionmode instancemovemode
orbitcameramode pathgridmode selectionmode pathgridselectionmode cameracontroller
cellwater terraintexturemode actor terrainselection terrainshapemode brushdraw commands
2014-02-27 13:46:06 +00:00
)
opencs_units (view/render
2016-03-14 04:04:11 +00:00
lighting lightingday lightingnight lightingbright object cell terrainstorage tagbase
cellarrow cellmarker cellborder pathgrid
2014-02-27 13:46:06 +00:00
)
2013-11-02 01:48:30 +00:00
opencs_hdrs (view/render
mask
)
opencs_units (view/tools
reportsubview reporttable searchsubview searchbox merge
)
opencs_units (view/tools
subviews
)
opencs_units (view/prefs
2017-05-11 07:46:51 +00:00
dialogue pagebase page keybindingpage contextmenulist
)
opencs_units (model/prefs
state setting intsetting doublesetting boolsetting enumsetting coloursetting shortcut
shortcuteventhandler shortcutmanager shortcutsetting modifiersetting stringsetting
)
opencs_units (model/prefs
2015-12-06 11:06:28 +00:00
category
)
opencs_units (model/filter
2013-08-24 12:43:38 +00:00
node unarynode narynode leafnode booleannode parser andnode ornode notnode textnode valuenode
2013-08-09 12:49:05 +00:00
)
2013-08-08 13:55:23 +00:00
opencs_units (view/filter
filterbox recordfilterbox editwidget
2013-08-08 13:55:23 +00:00
)
2012-11-21 16:31:18 +00:00
set (OPENCS_US
)
set (OPENCS_RES ${CMAKE_SOURCE_DIR}/files/opencs/resources.qrc
${CMAKE_SOURCE_DIR}/files/launcher/launcher.qrc
)
set (OPENCS_UI
${CMAKE_SOURCE_DIR}/files/ui/contentselector.ui
${CMAKE_SOURCE_DIR}/files/ui/filedialog.ui
2012-11-21 16:31:18 +00:00
)
source_group (openmw-cs FILES main.cpp ${OPENCS_SRC} ${OPENCS_HDR})
2012-11-21 16:31:18 +00:00
if(WIN32)
set(QT_USE_QTMAIN TRUE)
endif(WIN32)
2023-02-05 11:30:28 +00:00
qt_wrap_ui(OPENCS_UI_HDR ${OPENCS_UI})
qt_add_resources(OPENCS_RES_SRC ${OPENCS_RES})
2012-11-21 16:31:18 +00:00
# for compiled .ui files
include_directories(${CMAKE_CURRENT_BINARY_DIR})
2012-11-21 16:31:18 +00:00
2013-11-10 16:11:53 +00:00
if(APPLE)
set (OPENCS_MAC_ICON "${CMAKE_SOURCE_DIR}/files/mac/openmw-cs.icns")
set (OPENCS_CFG "${OpenMW_BINARY_DIR}/defaults-cs.bin")
set (OPENCS_DEFAULT_FILTERS_FILE "${OpenMW_BINARY_DIR}/resources/defaultfilters")
set (OPENCS_OPENMW_CFG "${OpenMW_BINARY_DIR}/openmw.cfg")
2013-11-10 16:11:53 +00:00
else()
set (OPENCS_MAC_ICON "")
set (OPENCS_CFG "")
set (OPENCS_DEFAULT_FILTERS_FILE "")
set (OPENCS_OPENMW_CFG "")
2013-11-10 16:11:53 +00:00
endif(APPLE)
add_library(openmw-cs-lib
2012-11-21 16:31:18 +00:00
${OPENCS_SRC}
${OPENCS_UI_HDR}
${OPENCS_MOC_SRC}
${OPENCS_RES_SRC}
)
set_target_properties(openmw-cs-lib PROPERTIES OUTPUT_NAME openmw-cs)
2023-03-10 00:19:15 +00:00
if(BUILD_OPENCS)
openmw_add_executable(openmw-cs
MACOSX_BUNDLE
${OPENCS_MAC_ICON}
${OPENCS_CFG}
${OPENCS_DEFAULT_FILTERS_FILE}
${OPENCS_OPENMW_CFG}
main.cpp
)
2012-11-21 16:31:18 +00:00
2023-03-10 00:19:15 +00:00
target_link_libraries(openmw-cs openmw-cs-lib)
2023-03-10 00:19:15 +00:00
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw-cs-lib PRIVATE --coverage)
target_link_libraries(openmw-cs-lib gcov)
endif()
endif()
if(APPLE AND BUILD_OPENCS)
set(OPENCS_BUNDLE_NAME "OpenMW-CS")
set(OPENCS_BUNDLE_RESOURCES_DIR "${OpenMW_BINARY_DIR}/${OPENCS_BUNDLE_NAME}.app/Contents/Resources")
2021-12-08 13:33:49 +00:00
set(OPENMW_RESOURCES_ROOT ${OPENCS_BUNDLE_RESOURCES_DIR})
add_subdirectory(../../files/ ${CMAKE_CURRENT_BINARY_DIR}/files)
2015-02-03 12:57:40 +00:00
set_target_properties(openmw-cs PROPERTIES
2013-11-10 16:11:53 +00:00
RUNTIME_OUTPUT_DIRECTORY "${OpenMW_BINARY_DIR}"
OUTPUT_NAME ${OPENCS_BUNDLE_NAME}
2015-02-03 12:18:03 +00:00
MACOSX_BUNDLE_ICON_FILE "openmw-cs.icns"
2017-09-02 23:07:12 +00:00
MACOSX_BUNDLE_BUNDLE_NAME "OpenMW-CS"
2013-11-10 16:11:53 +00:00
MACOSX_BUNDLE_GUI_IDENTIFIER "org.openmw.opencs"
MACOSX_BUNDLE_SHORT_VERSION_STRING ${OPENMW_VERSION}
MACOSX_BUNDLE_BUNDLE_VERSION ${OPENMW_VERSION}
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/files/mac/openmw-cs-Info.plist.in"
2013-11-10 16:11:53 +00:00
)
set_source_files_properties(${OPENCS_MAC_ICON} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
set_source_files_properties(${OPENCS_CFG} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
set_source_files_properties(${OPENCS_DEFAULT_FILTERS_FILE} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources/resources)
set_source_files_properties(${OPENCS_OPENMW_CFG} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
add_custom_command(TARGET openmw-cs
POST_BUILD
COMMAND cp "${OpenMW_BINARY_DIR}/resources/version" "${OPENCS_BUNDLE_RESOURCES_DIR}/resources")
2023-03-10 00:19:15 +00:00
endif()
2013-11-10 15:09:05 +00:00
target_link_libraries(openmw-cs-lib
# 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
${OSGVIEWER_LIBRARIES}
${OSGFX_LIBRARIES}
${OSGGA_LIBRARIES}
${OSGUTIL_LIBRARIES}
${OSGTEXT_LIBRARIES}
${OSG_LIBRARIES}
${EXTERN_OSGQT_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
components_qt
2013-02-17 13:46:50 +00:00
)
if (QT_VERSION_MAJOR VERSION_EQUAL 6)
target_link_libraries(openmw-cs-lib Qt::Widgets Qt::Core Qt::Network Qt::OpenGL Qt::OpenGLWidgets)
else()
target_link_libraries(openmw-cs-lib Qt::Widgets Qt::Core Qt::Network Qt::OpenGL)
endif()
if (WIN32)
target_link_libraries(openmw-cs-lib ${Boost_LOCALE_LIBRARY})
2023-03-10 00:19:15 +00:00
endif()
if (WIN32 AND BUILD_OPENCS)
INSTALL(TARGETS openmw-cs RUNTIME DESTINATION ".")
get_generator_is_multi_config(multi_config)
if (multi_config)
SET(INSTALL_SOURCE "${OpenMW_BINARY_DIR}/$<CONFIG>")
else ()
SET(INSTALL_SOURCE "${OpenMW_BINARY_DIR}")
endif ()
INSTALL(FILES "${INSTALL_SOURCE}/defaults-cs.bin" DESTINATION ".")
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)
endif (MSVC)
2023-03-10 00:19:15 +00:00
if(APPLE AND BUILD_OPENCS)
INSTALL(TARGETS openmw-cs BUNDLE DESTINATION "." COMPONENT Bundle)
2013-11-10 18:24:31 +00:00
endif()
if(USE_QT)
set_property(TARGET openmw-cs-lib PROPERTY AUTOMOC ON)
endif(USE_QT)
if (BUILD_WITH_CODE_COVERAGE)
target_compile_options(openmw-cs-lib PRIVATE --coverage)
target_link_libraries(openmw-cs-lib gcov)
endif()
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.16 AND MSVC)
target_precompile_headers(openmw-cs-lib PRIVATE
<boost/filesystem.hpp>
<boost/program_options/options_description.hpp>
<algorithm>
<fstream>
<functional>
<ostream>
<string>
<string_view>
<vector>
)
endif()