Warning, /rolisteam/rolisteam/src/libraries/core/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 cmake_minimum_required(VERSION 3.16) 0002 0003 set(CMAKE_AUTOMOC ON) 0004 SET(CMAKE_AUTOMOC_MOC_OPTIONS "-nw") 0005 set(CMAKE_AUTOUIC ON) 0006 set(CMAKE_AUTORCC ON) 0007 set(CMAKE_INCLUDE_CURRENT_DIR ON) 0008 set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) 0009 if(MSVC) 0010 set(CMAKE_CXX_FLAGS "-EHsc") 0011 else() 0012 set(CMAKE_CXX_FLAGS "-Wall") 0013 set(CMAKE_CXX_FLAGS_DEBUG "-g") 0014 set(CMAKE_CXX_FLAGS_RELEASE "-O3") 0015 endif() 0016 set(CMAKE_CXX_STANDARD 17) 0017 set(CMAKE_CXX_STANDARD_REQUIRED ON) 0018 0019 find_package(Qt6 COMPONENTS Core Widgets Gui Svg Network Multimedia PrintSupport Qml Quick Xml QuickWidgets QuickControls2 Xml WebEngineWidgets WebEngineCore Concurrent Sql PdfWidgets StateMachine REQUIRED) 0020 0021 if(TESTS) 0022 find_package(Qt6 COMPONENTS Test REQUIRED) 0023 endif() 0024 0025 #=============================================================== 0026 set(inc include) 0027 set(Network_HEADER 0028 ${inc}/network_global.h 0029 ${inc}/network/serverconnectionmanager.h 0030 ${inc}/network/serverconnection.h 0031 ${inc}/network/channelmodel.h 0032 ${inc}/media/mediatype.h 0033 ${inc}/network/connectionaccepter.h 0034 ${inc}/network/connectionprofile.h 0035 ${inc}/network/passwordaccepter.h 0036 ${inc}/network/iprangeaccepter.h 0037 ${inc}/network/ipbanaccepter.h 0038 ${inc}/network/characterdatamodel.h 0039 ${inc}/network/clientmanager.h 0040 ${inc}/network/clientconnection.h 0041 ${inc}/network/heartbeatsender.h 0042 ${inc}/network/timeaccepter.h 0043 ${inc}/network/channel.h 0044 ${inc}/network/treeitem.h 0045 ${inc}/network/networkmessage.h 0046 ${inc}/network/networkmessagereader.h 0047 ${inc}/network/networkmessagewriter.h 0048 ${inc}/network/rserver.h 0049 ${inc}/network/messagedispatcher.h 0050 ${inc}/network/receiveevent.h 0051 ${inc}/worker/networkhelper.h 0052 ${inc}/data/person.h 0053 ${inc}/data/player.h 0054 ${inc}/data/character.h 0055 ${inc}/data/characterstate.h 0056 ${inc}/data/resourcesnode.h 0057 ${inc}/worker/playermessagehelper.h 0058 ${inc}/updater/controller/servermanagerupdater.h 0059 ${inc}/network/upnp/upnpnat.h 0060 ${inc}/data/charactervision.h 0061 ) 0062 0063 set(Network_SRC 0064 src/network/channelmodel.cpp 0065 src/network/serverconnectionmanager.cpp 0066 src/network/serverconnection.cpp 0067 src/network/connectionprofile.cpp 0068 src/network/clientmanager.cpp 0069 src/network/clientconnection.cpp 0070 src/network/connectionaccepter.cpp 0071 src/network/passwordaccepter.cpp 0072 src/network/iprangeaccepter.cpp 0073 src/network/ipbanaccepter.cpp 0074 src/network/timeaccepter.cpp 0075 src/network/channel.cpp 0076 src/network/treeitem.cpp 0077 src/network/characterdatamodel.cpp 0078 src/network/networkmessage.cpp 0079 src/network/networkmessagereader.cpp 0080 src/network/networkmessagewriter.cpp 0081 src/network/heartbeatsender.cpp 0082 src/network/rserver.cpp 0083 src/network/messagedispatcher.cpp 0084 src/network/receiveevent.cpp 0085 src/data/person.cpp 0086 src/data/player.cpp 0087 src/data/character.cpp 0088 src/data/characterstate.cpp 0089 src/data/resourcesnode.cpp 0090 src/worker/networkhelper.cpp 0091 src/worker/playermessagehelper.cpp 0092 src/updater/controller/servermanagerupdater.cpp 0093 src/network/upnp/upnpnat.cpp 0094 src/data/charactervision.cpp 0095 ) 0096 message(${Network_SRC} ${Network_HEADER}) 0097 add_library(network SHARED ${Network_SRC} ${Network_HEADER}) 0098 set_target_properties(network PROPERTIES PUBLIC_HEADER "${Network_HEADER}") 0099 set_target_properties(network PROPERTIES COMPILE_DEFINITIONS "UNIT_TEST=1") 0100 target_compile_definitions(network PRIVATE NETWORK_LIBRARY) 0101 target_link_libraries(network 0102 PUBLIC 0103 Qt6::Core 0104 Qt6::Network 0105 Qt6::Gui 0106 Qt6::StateMachine 0107 Qt6::Xml 0108 PRIVATE 0109 common_core 0110 utils 0111 charactersheet 0112 ) 0113 target_include_directories(network 0114 PRIVATE 0115 ${CMAKE_CURRENT_SOURCE_DIR}/src 0116 ${CMAKE_CURRENT_SOURCE_DIR}/src/upnp 0117 ${CMAKE_CURRENT_SOURCE_DIR} 0118 ${CMAKE_CURRENT_SOURCE_DIR}/.. 0119 PUBLIC 0120 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 0121 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> 0122 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> 0123 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/upnp> 0124 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) 0125 0126 0127 0128 0129 0130 #=============================================================== 0131 0132 0133 set(HEADERS 0134 ${inc}/core_global.h 0135 ${inc}/controller/antagonistboardcontroller.h 0136 ${inc}/controller/view_controller/pdfcontroller.h 0137 ${inc}/controller/contentcontroller.h 0138 ${inc}/controller/controllerinterface.h 0139 ${inc}/controller/gamecontroller.h 0140 ${inc}/controller/instantmessagingcontroller.h 0141 ${inc}/controller/item_controllers/characteritemcontroller.h 0142 ${inc}/controller/item_controllers/ellipsecontroller.h 0143 ${inc}/controller/item_controllers/gridcontroller.h 0144 ${inc}/controller/item_controllers/imageitemcontroller.h 0145 ${inc}/controller/item_controllers/linecontroller.h 0146 ${inc}/controller/item_controllers/pathcontroller.h 0147 ${inc}/controller/item_controllers/rectcontroller.h 0148 ${inc}/controller/item_controllers/sightcontroller.h 0149 ${inc}/controller/item_controllers/textcontroller.h 0150 ${inc}/controller/item_controllers/visualitemcontroller.h 0151 ${inc}/controller/item_controllers/vmapitemfactory.h 0152 ${inc}/controller/networkcontroller.h 0153 ${inc}/controller/audioplayercontroller.h 0154 ${inc}/controller/audiocontroller.h 0155 ${inc}/controller/playercontroller.h 0156 ${inc}/controller/preferencescontroller.h 0157 ${inc}/controller/view_controller/charactersheetcontroller.h 0158 ${inc}/controller/view_controller/imagecontroller.h 0159 ${inc}/controller/view_controller/imageselectorcontroller.h 0160 ${inc}/controller/view_controller/mediacontrollerbase.h 0161 ${inc}/controller/view_controller/mindmapcontroller.h 0162 ${inc}/controller/view_controller/mindmapcontrollerbase.h 0163 ${inc}/controller/view_controller/notecontroller.h 0164 ${inc}/controller/view_controller/sharednotecontroller.h 0165 ${inc}/controller/view_controller/vectorialmapcontroller.h 0166 ${inc}/controller/view_controller/webpagecontroller.h 0167 ${inc}/controller/view_controller/selectconnprofilecontroller.h 0168 ${inc}/controller/view_controller/sidemenucontroller.h 0169 ${inc}/data/campaign.h 0170 ${inc}/data/campaigneditor.h 0171 ${inc}/data/campaignmanager.h 0172 ${inc}/data/cleveruri.h 0173 ${inc}/data/cleverurimimedata.h 0174 ${inc}/data/diceshortcut.h 0175 ${inc}/data/localpersonmodel.h 0176 ${inc}/data/media.h 0177 ${inc}/data/chatroom.h 0178 ${inc}/data/chatroomfactory.h 0179 ${inc}/data/rolisteammimedata.h 0180 ${inc}/data/rolisteamtheme.h 0181 ${inc}/data/shortcutmodel.h 0182 ${inc}/media/mediafactory.h 0183 ${inc}/media/mediatype.h 0184 ${inc}/model/colormodel.h 0185 ${inc}/model/statemodel.h 0186 ${inc}/model/actiononlistmodel.h 0187 ${inc}/model/charactermodel.h 0188 ${inc}/model/characterstatemodel.h 0189 ${inc}/model/historymodel.h 0190 ${inc}/model/contentmodel.h 0191 ${inc}/model/dicealiasmodel.h 0192 ${inc}/model/genericmodel.h 0193 ${inc}/model/languagemodel.h 0194 ${inc}/model/mediafilteredmodel.h 0195 ${inc}/model/mediamodel.h 0196 ${inc}/model/musicmodel.h 0197 ${inc}/model/nonplayablecharactermodel.h 0198 ${inc}/model/palettemodel.h 0199 ${inc}/model/participantsmodel.h 0200 ${inc}/model/participantmodel.h 0201 ${inc}/model/patternmodel.h 0202 ${inc}/model/playermodel.h 0203 ${inc}/model/playerproxymodel.h 0204 ${inc}/model/profilemodel.h 0205 ${inc}/model/remoteplayermodel.h 0206 ${inc}/model/singlecontenttypemodel.h 0207 ${inc}/model/thememodel.h 0208 ${inc}/model/vmapitemmodel.h 0209 ${inc}/model/messagemodel.h 0210 ${inc}/model/filterinstantmessagingmodel.h 0211 ${inc}/model/messagemodel.h 0212 ${inc}/model/chatroomsplittermodel.h 0213 ${inc}/model/filteredplayermodel.h 0214 ${inc}/model/instantmessagingmodel.h 0215 ${inc}/model/proxystatemodel.h 0216 ${inc}/model/filteredcharactermodel.h 0217 ${inc}/preferences/preferenceslistener.h 0218 ${inc}/preferences/preferencesmanager.h 0219 ${inc}/services/ipchecker.h 0220 ${inc}/services/tipchecker.h 0221 ${inc}/services/updatechecker.h 0222 ${inc}/session/sessionitemmodel.h 0223 ${inc}/undoCmd/addfogofwarchangecommand.h 0224 ${inc}/undoCmd/addlocalcharactercommand.h 0225 ${inc}/undoCmd/addnonplayablecharactercommand.h 0226 ${inc}/undoCmd/addvmapitem.h 0227 ${inc}/undoCmd/changecoloritem.h 0228 ${inc}/undoCmd/changesizevmapitem.h 0229 ${inc}/undoCmd/anchorvmapitemcommand.h 0230 ${inc}/undoCmd/deletevmapitem.h 0231 ${inc}/undoCmd/hideotherlayercommand.h 0232 ${inc}/undoCmd/importdatamedia.h 0233 ${inc}/undoCmd/importimagestate.h 0234 ${inc}/undoCmd/importmedia.h 0235 ${inc}/undoCmd/newmediacontroller.h 0236 ${inc}/undoCmd/openmediacontroller.h 0237 ${inc}/undoCmd/renamecampaignmedia.h 0238 ${inc}/undoCmd/removelocalcharactercommand.h 0239 ${inc}/undoCmd/removemediacontrollercommand.h 0240 ${inc}/undoCmd/showtransparentitemcommand.h 0241 ${inc}/undoCmd/rollinitcommand.h 0242 ${inc}/undoCmd/dupplicatevmapitem.h 0243 ${inc}/updater/controller/audioplayerupdater.h 0244 ${inc}/updater/controller/playerupdater.h 0245 ${inc}/updater/media/campaignupdater.h 0246 ${inc}/updater/media/charactersheetupdater.h 0247 ${inc}/updater/media/genericupdater.h 0248 ${inc}/updater/media/instantmessagingupdater.h 0249 ${inc}/updater/media/mediaupdaterinterface.h 0250 ${inc}/updater/media/mindmapupdater.h 0251 ${inc}/updater/media/sharednotecontrollerupdater.h 0252 ${inc}/updater/media/vmapupdater.h 0253 ${inc}/updater/media/webviewupdater.h 0254 ${inc}/updater/vmapitem/characteritemupdater.h 0255 ${inc}/updater/vmapitem/ellipsecontrollerupdater.h 0256 ${inc}/updater/vmapitem/imagecontrollerupdater.h 0257 ${inc}/updater/vmapitem/linecontrollerupdater.h 0258 ${inc}/updater/vmapitem/pathcontrollerupdater.h 0259 ${inc}/updater/vmapitem/rectcontrollerupdater.h 0260 ${inc}/updater/vmapitem/textcontrollerupdater.h 0261 ${inc}/updater/vmapitem/vmapitemcontrollerupdater.h 0262 ${inc}/updater/vmapitem/sightupdater.h 0263 ${inc}/utils/insertionsortedmap.h 0264 ${inc}/utils/countdownobject.h 0265 ${inc}/utils/HashHelper.h 0266 ${inc}/worker/autosavecontroller.h 0267 ${inc}/worker/convertionhelper.h 0268 ${inc}/worker/fileserializer.h 0269 ${inc}/worker/iohelper.h 0270 ${inc}/worker/messagehelper.h 0271 ${inc}/worker/modelhelper.h 0272 ${inc}/worker/utilshelper.h 0273 ${inc}/worker/vectorialmapmessagehelper.h 0274 ${inc}/worker/characterfinder.h) 0275 0276 0277 set(SOURCES 0278 src/controller/antagonistboardcontroller.cpp 0279 src/controller/contentcontroller.cpp 0280 src/controller/gamecontroller.cpp 0281 src/controller/instantmessagingcontroller.cpp 0282 src/controller/item_controllers/characteritemcontroller.cpp 0283 src/controller/item_controllers/ellipsecontroller.cpp 0284 src/controller/item_controllers/gridcontroller.cpp 0285 src/controller/item_controllers/imageitemcontroller.cpp 0286 src/controller/item_controllers/linecontroller.cpp 0287 src/controller/item_controllers/pathcontroller.cpp 0288 src/controller/item_controllers/rectcontroller.cpp 0289 src/controller/item_controllers/sightcontroller.cpp 0290 src/controller/item_controllers/textcontroller.cpp 0291 src/controller/item_controllers/visualitemcontroller.cpp 0292 src/controller/item_controllers/vmapitemfactory.cpp 0293 src/controller/networkcontroller.cpp 0294 src/controller/playercontroller.cpp 0295 src/controller/preferencescontroller.cpp 0296 src/controller/audioplayercontroller.cpp 0297 src/controller/view_controller/charactersheetcontroller.cpp 0298 src/controller/view_controller/sidemenucontroller.cpp 0299 src/controller/view_controller/pdfcontroller.cpp 0300 src/controller/view_controller/imagecontroller.cpp 0301 src/controller/view_controller/imageselectorcontroller.cpp 0302 src/controller/view_controller/mediacontrollerbase.cpp 0303 src/controller/view_controller/mindmapcontroller.cpp 0304 src/controller/view_controller/mindmapcontrollerbase.cpp 0305 src/controller/view_controller/notecontroller.cpp 0306 src/controller/view_controller/sharednotecontroller.cpp 0307 src/controller/view_controller/vectorialmapcontroller.cpp 0308 src/controller/view_controller/webpagecontroller.cpp 0309 src/controller/view_controller/selectconnprofilecontroller.cpp 0310 src/controller/audiocontroller.cpp 0311 src/data/campaign.cpp 0312 src/data/campaigneditor.cpp 0313 src/data/campaignmanager.cpp 0314 src/data/cleveruri.cpp 0315 src/data/cleverurimimedata.cpp 0316 src/data/diceshortcut.cpp 0317 src/data/localpersonmodel.cpp 0318 src/data/media.cpp 0319 src/data/chatroom.cpp 0320 src/data/chatroomfactory.cpp 0321 src/data/rolisteammimedata.cpp 0322 src/data/rolisteamtheme.cpp 0323 src/data/shortcutmodel.cpp 0324 src/media/mediafactory.cpp 0325 src/model/colormodel.cpp 0326 src/model/statemodel.cpp 0327 src/model/messagemodel.cpp 0328 src/model/filteredcharactermodel.cpp 0329 src/model/filterinstantmessagingmodel.cpp 0330 src/model/messagemodel.cpp 0331 src/model/chatroomsplittermodel.cpp 0332 src/model/filteredplayermodel.cpp 0333 src/model/instantmessagingmodel.cpp 0334 src/model/actiononlistmodel.cpp 0335 src/model/charactermodel.cpp 0336 src/model/characterstatemodel.cpp 0337 src/model/proxystatemodel.cpp 0338 src/model/contentmodel.cpp 0339 src/model/dicealiasmodel.cpp 0340 src/model/languagemodel.cpp 0341 src/model/mediafilteredmodel.cpp 0342 src/model/mediamodel.cpp 0343 src/model/historymodel.cpp 0344 src/model/musicmodel.cpp 0345 src/model/nonplayablecharactermodel.cpp 0346 src/model/palettemodel.cpp 0347 src/model/participantsmodel.cpp 0348 src/model/participantmodel.cpp 0349 src/model/patternmodel.cpp 0350 src/model/playermodel.cpp 0351 src/model/playerproxymodel.cpp 0352 src/model/profilemodel.cpp 0353 src/model/genericmodel.cpp 0354 src/model/remoteplayermodel.cpp 0355 src/model/singlecontenttypemodel.cpp 0356 src/model/thememodel.cpp 0357 src/model/vmapitemmodel.cpp 0358 src/preferences/preferenceslistener.cpp 0359 src/preferences/preferencesmanager.cpp 0360 src/services/ipchecker.cpp 0361 src/services/tipchecker.cpp 0362 src/services/updatechecker.cpp 0363 src/session/sessionitemmodel.cpp 0364 src/undoCmd/addfogofwarchangecommand.cpp 0365 src/undoCmd/addlocalcharactercommand.cpp 0366 src/undoCmd/addnonplayablecharactercommand.cpp 0367 src/undoCmd/anchorvmapitemcommand.cpp 0368 src/undoCmd/addvmapitem.cpp 0369 src/undoCmd/changecoloritem.cpp 0370 src/undoCmd/changesizevmapitem.cpp 0371 src/undoCmd/deletevmapitem.cpp 0372 src/undoCmd/hideotherlayercommand.cpp 0373 src/undoCmd/importdatamedia.cpp 0374 src/undoCmd/importimagestate.cpp 0375 src/undoCmd/importmedia.cpp 0376 src/undoCmd/newmediacontroller.cpp 0377 src/undoCmd/openmediacontroller.cpp 0378 src/undoCmd/renamecampaignmedia.cpp 0379 src/undoCmd/rollinitcommand.cpp 0380 src/undoCmd/removelocalcharactercommand.cpp 0381 src/undoCmd/removemediacontrollercommand.cpp 0382 src/undoCmd/showtransparentitemcommand.cpp 0383 src/undoCmd/dupplicatevmapitem.cpp 0384 src/updater/controller/audioplayerupdater.cpp 0385 src/updater/controller/playerupdater.cpp 0386 src/updater/media/campaignupdater.cpp 0387 src/updater/media/charactersheetupdater.cpp 0388 src/updater/media/genericupdater.cpp 0389 src/updater/media/instantmessagingupdater.cpp 0390 src/updater/media/mediaupdaterinterface.cpp 0391 src/updater/media/mindmapupdater.cpp 0392 src/updater/media/sharednotecontrollerupdater.cpp 0393 src/updater/media/vmapupdater.cpp 0394 src/updater/media/webviewupdater.cpp 0395 src/updater/vmapitem/characteritemupdater.cpp 0396 src/updater/vmapitem/ellipsecontrollerupdater.cpp 0397 src/updater/vmapitem/imagecontrollerupdater.cpp 0398 src/updater/vmapitem/linecontrollerupdater.cpp 0399 src/updater/vmapitem/pathcontrollerupdater.cpp 0400 src/updater/vmapitem/rectcontrollerupdater.cpp 0401 src/updater/vmapitem/textcontrollerupdater.cpp 0402 src/updater/vmapitem/sightupdater.cpp 0403 src/updater/vmapitem/vmapitemcontrollerupdater.cpp 0404 src/utils/countdownobject.cpp 0405 src/worker/autosavecontroller.cpp 0406 src/worker/convertionhelper.cpp 0407 src/worker/fileserializer.cpp 0408 src/worker/iohelper.cpp 0409 src/worker/messagehelper.cpp 0410 src/worker/modelhelper.cpp 0411 src/worker/utilshelper.cpp 0412 src/worker/vectorialmapmessagehelper.cpp 0413 src/worker/characterfinder.cpp) 0414 0415 add_library(core SHARED ${SOURCES} ${HEADERS} ${pdfSource} ${QRC_SOURCES} 0416 ) 0417 set_target_properties(core PROPERTIES PUBLIC_HEADER "${HEADERS}") 0418 target_compile_definitions(core PRIVATE CORE_LIBRARY) 0419 target_compile_definitions(core PUBLIC _USE_MATH_DEFINES) 0420 target_link_libraries(core 0421 PUBLIC 0422 Qt6::Core 0423 Qt6::Network 0424 Qt6::Multimedia 0425 Qt6::Concurrent 0426 PRIVATE 0427 diceparser_qobject 0428 diceparser_shared 0429 rmindmap 0430 common_core 0431 common_qml 0432 charactersheet 0433 charactersheet_widgets 0434 instantmessaging 0435 utils 0436 network) 0437 0438 target_include_directories(core PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src 0439 PUBLIC 0440 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> 0441 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) 0442 0443 0444 message(${CMAKE_CURRENT_BINARY_DIR}) 0445 message(${CMAKE_CURRENT_BINARY_DIR}) 0446 message(${CMAKE_CURRENT_BINARY_DIR}) 0447 message(${CMAKE_CURRENT_BINARY_DIR}) 0448 0449 if("${CAMKE_CXX_COMPILER_ID}" STREQUAL "Clang") 0450 set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/core_autogen/mocs_compilation.cpp" PROPERTIES COMPILE_FLAGS "-Wno-undefined-reinterpret-cast -Wno-useless-cast") 0451 set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/network_autogen/mocs_compilation.cpp" PROPERTIES COMPILE_FLAGS "-Wno-undefined-reinterpret-cast -Wno-useless-cast") 0452 endif() 0453 0454 include(install_helper) 0455 rinstallLib(core libraries) 0456 rinstallLib(network libraries) 0457