From 0f1e226960ea90ead30d52382f1940d154a6a7e6 Mon Sep 17 00:00:00 2001 From: Xiphoseer Date: Wed, 3 Jan 2024 21:31:50 +0100 Subject: [PATCH] fix: remove dZoneManager from global include --- CMakeLists.txt | 2 -- dGame/CMakeLists.txt | 4 +++- dGame/dBehaviors/CMakeLists.txt | 1 + dGame/dComponents/CMakeLists.txt | 1 + dGame/dGameMessages/CMakeLists.txt | 1 + dGame/dInventory/CMakeLists.txt | 1 + dGame/dMission/CMakeLists.txt | 1 + dGame/dUtilities/CMakeLists.txt | 1 + dMasterServer/CMakeLists.txt | 4 +++- dScripts/CMakeLists.txt | 1 + dZoneManager/CMakeLists.txt | 2 +- 11 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d35769b..9486ef58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -214,8 +214,6 @@ set(INCLUDED_DIRECTORIES "dNavigation" "dNavigation/dTerrain" - "dZoneManager" - "dDatabase" "dDatabase/CDClientDatabase" "dDatabase/CDClientDatabase/CDClientTables" diff --git a/dGame/CMakeLists.txt b/dGame/CMakeLists.txt index 541536d4..ba0dbf5a 100644 --- a/dGame/CMakeLists.txt +++ b/dGame/CMakeLists.txt @@ -16,7 +16,9 @@ include_directories( add_library(dGameBase ${DGAME_SOURCES}) target_precompile_headers(dGameBase PRIVATE ${HEADERS_DGAME}) target_include_directories(dGameBase PUBLIC "." "dEntity" - PRIVATE "dComponents" "dGameMessages" "dBehaviors" "dMission" "dUtilities" "dInventory") + PRIVATE "dComponents" "dGameMessages" "dBehaviors" "dMission" "dUtilities" "dInventory" + "${PROJECT_SOURCE_DIR}/dZoneManager" +) target_link_libraries(dGameBase PUBLIC dDatabase dPhysics INTERFACE dComponents dEntity) diff --git a/dGame/dBehaviors/CMakeLists.txt b/dGame/dBehaviors/CMakeLists.txt index aa8aa5f7..6b667356 100644 --- a/dGame/dBehaviors/CMakeLists.txt +++ b/dGame/dBehaviors/CMakeLists.txt @@ -65,5 +65,6 @@ target_include_directories(dBehaviors PUBLIC "." "${PROJECT_SOURCE_DIR}/dGame/dUtilities" # Preconditions.h via QuickBuildComponent.h "${PROJECT_SOURCE_DIR}/dGame/dEntity" # via dZoneManager.h, Spawner.h "${PROJECT_SOURCE_DIR}/dGame/dInventory" # via CharacterComponent.h + "${PROJECT_SOURCE_DIR}/dZoneManager" # via BasicAttackBehavior.cpp ) target_precompile_headers(dBehaviors REUSE_FROM dGameBase) diff --git a/dGame/dComponents/CMakeLists.txt b/dGame/dComponents/CMakeLists.txt index 810cc74f..1f294ef7 100644 --- a/dGame/dComponents/CMakeLists.txt +++ b/dGame/dComponents/CMakeLists.txt @@ -59,6 +59,7 @@ target_include_directories(dComponents PUBLIC "." "${PROJECT_SOURCE_DIR}/dGame/dGameMessages" # direct "${PROJECT_SOURCE_DIR}/dGame/dUtilities" # direct Loot.h "${PROJECT_SOURCE_DIR}/dGame/dEntity" # via dZoneManager/Spawner.h + "${PROJECT_SOURCE_DIR}/dZoneManager" # via BouncerComponent.cpp, ActivityComponent.cpp ) target_precompile_headers(dComponents REUSE_FROM dGameBase) target_link_libraries(dComponents diff --git a/dGame/dGameMessages/CMakeLists.txt b/dGame/dGameMessages/CMakeLists.txt index c7d5b3fb..7a043ddb 100644 --- a/dGame/dGameMessages/CMakeLists.txt +++ b/dGame/dGameMessages/CMakeLists.txt @@ -18,5 +18,6 @@ target_include_directories(dGameMessages PUBLIC "." "${PROJECT_SOURCE_DIR}/dGame/dBehaviors" # via InventoryComponent.h "${PROJECT_SOURCE_DIR}/dGame/dInventory" # via InventoryComponent.h "${PROJECT_SOURCE_DIR}/dGame/dEntity" # via dZoneManager/Spawner.h + "${PROJECT_SOURCE_DIR}/dZoneManager" # via GameMessages.cpp, GameMessageHandler.cpp ) target_precompile_headers(dGameMessages REUSE_FROM dGameBase) diff --git a/dGame/dInventory/CMakeLists.txt b/dGame/dInventory/CMakeLists.txt index f5dd2592..52d012bb 100644 --- a/dGame/dInventory/CMakeLists.txt +++ b/dGame/dInventory/CMakeLists.txt @@ -14,6 +14,7 @@ target_include_directories(dInventory PUBLIC "." "${PROJECT_SOURCE_DIR}/dGame/dBehaviors" # via InventoryComponent.h "${PROJECT_SOURCE_DIR}/dGame/dEntity" # via dZoneManager/Spawner.h "${PROJECT_SOURCE_DIR}/dGame/dMission" # via MissionComponent.h + "${PROJECT_SOURCE_DIR}/dZoneManager" # via Item.cpp ) target_link_libraries(dInventory INTERFACE dNet) target_precompile_headers(dInventory REUSE_FROM dGameBase) diff --git a/dGame/dMission/CMakeLists.txt b/dGame/dMission/CMakeLists.txt index fa3fcc9b..edabd0bc 100644 --- a/dGame/dMission/CMakeLists.txt +++ b/dGame/dMission/CMakeLists.txt @@ -13,5 +13,6 @@ target_include_directories(dMission PUBLIC "." "${PROJECT_SOURCE_DIR}/dGame/dGameMessages" # via LevelProgressionComponent.h "${PROJECT_SOURCE_DIR}/dGame/dEntity" # via dZoneManager/Spawner.h "${PROJECT_SOURCE_DIR}/dGame/dBehaviors" # via InventoryComponent.h + "${PROJECT_SOURCE_DIR}/dZoneManager" # via Mission.cpp, MissionTask.cpp ) target_precompile_headers(dMission REUSE_FROM dGameBase) diff --git a/dGame/dUtilities/CMakeLists.txt b/dGame/dUtilities/CMakeLists.txt index 6d26cd5a..1b9a3e56 100644 --- a/dGame/dUtilities/CMakeLists.txt +++ b/dGame/dUtilities/CMakeLists.txt @@ -18,6 +18,7 @@ target_include_directories(dUtilities PUBLIC "." "${PROJECT_SOURCE_DIR}/dGame/dBehaviors" # transitive via InventoryComponent.h "${PROJECT_SOURCE_DIR}/dGame/dMission" # transitive via MissionComponent.h "${PROJECT_SOURCE_DIR}/dGame/dEntity" # transitive via dZoneManager/Spawner.h + "${PROJECT_SOURCE_DIR}/dZoneManager" # Mail.cpp ) target_link_libraries(dUtilities PUBLIC dDatabase dPhysics diff --git a/dMasterServer/CMakeLists.txt b/dMasterServer/CMakeLists.txt index 108cddc2..281c9f24 100644 --- a/dMasterServer/CMakeLists.txt +++ b/dMasterServer/CMakeLists.txt @@ -7,7 +7,9 @@ set(DMASTERSERVER_SOURCES add_library(dMasterServer ${DMASTERSERVER_SOURCES}) add_executable(MasterServer "MasterServer.cpp") add_compile_definitions(MasterServer PRIVATE PROJECT_VERSION="\"${PROJECT_VERSION}\"") - +target_include_directories(dMasterServer PUBLIC "." + "${PROJECT_SOURCE_DIR}/dZoneManager" # InstanceManager.h uses dZMCommon.h +) target_link_libraries(dMasterServer ${COMMON_LIBRARIES}) target_link_libraries(MasterServer ${COMMON_LIBRARIES} dMasterServer) diff --git a/dScripts/CMakeLists.txt b/dScripts/CMakeLists.txt index 58836962..2da73eb3 100644 --- a/dScripts/CMakeLists.txt +++ b/dScripts/CMakeLists.txt @@ -32,6 +32,7 @@ include_directories( "${PROJECT_SOURCE_DIR}/dGame/dMission" # via MissionComponent.h "${PROJECT_SOURCE_DIR}/dGame/dBehaviors" # viaInventoryComponent.h "${PROJECT_SOURCE_DIR}/dGame/dInventory" # via InventoryComponent.h + "${PROJECT_SOURCE_DIR}/dZoneManager" ) link_libraries(dScriptsBase) # dComponents diff --git a/dZoneManager/CMakeLists.txt b/dZoneManager/CMakeLists.txt index d1e6c0dd..ef6c8092 100644 --- a/dZoneManager/CMakeLists.txt +++ b/dZoneManager/CMakeLists.txt @@ -7,7 +7,7 @@ add_library(dZoneManager STATIC ${DZONEMANAGER_SOURCES}) target_link_libraries(dZoneManager PUBLIC dPhysics INTERFACE dWorldServer) -target_include_directories(dZoneManager PUBLIC +target_include_directories(dZoneManager PUBLIC "." ${PROJECT_SOURCE_DIR}/dGame # Entity.h ${PROJECT_SOURCE_DIR}/dGame/dEntity # EntityInfo.h PRIVATE