From 1ab5524373cef2148f8db20ba187be34f5a21fd2 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Mon, 9 Jun 2025 13:32:31 +0200 Subject: [PATCH 1/2] [CMAKE] Remove obsolete interface libraries, add missing core gameengine include interface library --- Core/CMakeLists.txt | 6 +++--- Generals/Code/CMakeLists.txt | 10 ---------- .../Libraries/Source/WWVegas/WWDownload/CMakeLists.txt | 1 + Generals/Code/Tools/ParticleEditor/CMakeLists.txt | 1 + Generals/Code/Tools/WorldBuilder/CMakeLists.txt | 2 -- GeneralsMD/Code/CMakeLists.txt | 10 ---------- .../Libraries/Source/WWVegas/WWDownload/CMakeLists.txt | 1 + GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt | 1 + GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt | 2 -- 9 files changed, 7 insertions(+), 27 deletions(-) diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 30b785f330c..d98066d1bf2 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -1,13 +1,13 @@ -# c stands for core, i stands for Interface +# i stands for Interface +add_library(corei_gameengine_include INTERFACE) add_library(corei_libraries_include INTERFACE) add_library(corei_libraries_source_wwvegas INTERFACE) -add_library(corei_libraries_source_wwvegas_wwdebug INTERFACE) add_library(corei_libraries_source_wwvegas_wwlib INTERFACE) add_library(corei_always INTERFACE) +target_include_directories(corei_gameengine_include INTERFACE "GameEngine/Include") target_include_directories(corei_libraries_include INTERFACE "Libraries/Include") target_include_directories(corei_libraries_source_wwvegas INTERFACE "Libraries/Source/WWVegas") -target_include_directories(corei_libraries_source_wwvegas_wwdebug INTERFACE "Libraries/Source/WWVegas/WWDebug") target_include_directories(corei_libraries_source_wwvegas_wwlib INTERFACE "Libraries/Source/WWVegas/WWLib") target_link_libraries(corei_always INTERFACE core_utility diff --git a/Generals/Code/CMakeLists.txt b/Generals/Code/CMakeLists.txt index 838818eff2f..64042c36d24 100644 --- a/Generals/Code/CMakeLists.txt +++ b/Generals/Code/CMakeLists.txt @@ -1,23 +1,13 @@ # g stands for Generals, i stands for Interface -add_library(gi_gameengine INTERFACE) add_library(gi_gameengine_include INTERFACE) -add_library(gi_gameenginedevice_include INTERFACE) add_library(gi_libraries_include INTERFACE) add_library(gi_libraries_source_wwvegas INTERFACE) -add_library(gi_libraries_source_wwvegas_ww3d2 INTERFACE) -add_library(gi_libraries_source_wwvegas_wwmath INTERFACE) -add_library(gi_libraries_source_wwvegas_wwsaveload INTERFACE) add_library(gi_main INTERFACE) add_library(gi_always INTERFACE) -target_include_directories(gi_gameengine INTERFACE "GameEngine") target_include_directories(gi_gameengine_include INTERFACE "GameEngine/Include") -target_include_directories(gi_gameenginedevice_include INTERFACE "GameEngineDevice/Source") target_include_directories(gi_libraries_include INTERFACE "Libraries/Include") target_include_directories(gi_libraries_source_wwvegas INTERFACE "Libraries/Source/WWVegas") -target_include_directories(gi_libraries_source_wwvegas_ww3d2 INTERFACE "Libraries/Source/WWVegas/WW3D2") -target_include_directories(gi_libraries_source_wwvegas_wwmath INTERFACE "Libraries/Source/WWVegas/WWMath") -target_include_directories(gi_libraries_source_wwvegas_wwsaveload INTERFACE "Libraries/Source/WWVegas/WWSaveLoad") target_include_directories(gi_main INTERFACE "Main") target_compile_definitions(gi_always INTERFACE diff --git a/Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt b/Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt index b55deed1648..6396b3c62ab 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt +++ b/Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt @@ -2,6 +2,7 @@ add_library(g_wwdownload STATIC) set_target_properties(g_wwdownload PROPERTIES OUTPUT_NAME wwdownload) target_link_libraries(g_wwdownload PRIVATE + corei_gameengine_include corei_wwdownload gi_always gi_gameengine_include diff --git a/Generals/Code/Tools/ParticleEditor/CMakeLists.txt b/Generals/Code/Tools/ParticleEditor/CMakeLists.txt index bf7005ea58a..97a86421c37 100644 --- a/Generals/Code/Tools/ParticleEditor/CMakeLists.txt +++ b/Generals/Code/Tools/ParticleEditor/CMakeLists.txt @@ -39,6 +39,7 @@ target_include_directories(g_particleeditor PRIVATE target_compile_definitions(g_particleeditor PRIVATE _AFXDLL) target_link_libraries(g_particleeditor PRIVATE + corei_gameengine_include corei_libraries_source_wwvegas corei_libraries_source_wwvegas_wwlib d3d8lib diff --git a/Generals/Code/Tools/WorldBuilder/CMakeLists.txt b/Generals/Code/Tools/WorldBuilder/CMakeLists.txt index 325820e2359..3cb3b49c265 100644 --- a/Generals/Code/Tools/WorldBuilder/CMakeLists.txt +++ b/Generals/Code/Tools/WorldBuilder/CMakeLists.txt @@ -210,8 +210,6 @@ target_link_libraries(g_worldbuilder PRIVATE core_browserdispatch g_gameengine g_gameenginedevice - gi_gameengine_include - gi_gameenginedevice_include gi_always imm32 vfw32 diff --git a/GeneralsMD/Code/CMakeLists.txt b/GeneralsMD/Code/CMakeLists.txt index 856b64d0b76..9e2dd712e56 100644 --- a/GeneralsMD/Code/CMakeLists.txt +++ b/GeneralsMD/Code/CMakeLists.txt @@ -1,23 +1,13 @@ # z stands for Zero Hour, i stands for Interface -add_library(zi_gameengine INTERFACE) add_library(zi_gameengine_include INTERFACE) -add_library(zi_gameenginedevice_include INTERFACE) add_library(zi_libraries_include INTERFACE) add_library(zi_libraries_source_wwvegas INTERFACE) -add_library(zi_libraries_source_wwvegas_ww3d2 INTERFACE) -add_library(zi_libraries_source_wwvegas_wwmath INTERFACE) -add_library(zi_libraries_source_wwvegas_wwsaveload INTERFACE) add_library(zi_main INTERFACE) add_library(zi_always INTERFACE) -target_include_directories(zi_gameengine INTERFACE "GameEngine") target_include_directories(zi_gameengine_include INTERFACE "GameEngine/Include") -target_include_directories(zi_gameenginedevice_include INTERFACE "GameEngineDevice/Source") target_include_directories(zi_libraries_include INTERFACE "Libraries/Include") target_include_directories(zi_libraries_source_wwvegas INTERFACE "Libraries/Source/WWVegas") -target_include_directories(zi_libraries_source_wwvegas_ww3d2 INTERFACE "Libraries/Source/WWVegas/WW3D2") -target_include_directories(zi_libraries_source_wwvegas_wwmath INTERFACE "Libraries/Source/WWVegas/WWMath") -target_include_directories(zi_libraries_source_wwvegas_wwsaveload INTERFACE "Libraries/Source/WWVegas/WWSaveLoad") target_include_directories(zi_main INTERFACE "Main") target_compile_definitions(zi_always INTERFACE diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt index df1e5ef9202..c1e5aecb31f 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt @@ -2,6 +2,7 @@ add_library(z_wwdownload STATIC) set_target_properties(z_wwdownload PROPERTIES OUTPUT_NAME wwdownload) target_link_libraries(z_wwdownload PRIVATE + corei_gameengine_include corei_wwdownload zi_always zi_gameengine_include diff --git a/GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt b/GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt index 0b410f34701..2dcf62fb150 100644 --- a/GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt @@ -39,6 +39,7 @@ target_include_directories(z_particleeditor PRIVATE target_link_libraries(z_particleeditor PRIVATE core_debug core_profile + corei_gameengine_include corei_libraries_source_wwvegas corei_libraries_source_wwvegas_wwlib d3d8lib diff --git a/GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt b/GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt index c24f97e5856..1daa5339e90 100644 --- a/GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/WorldBuilder/CMakeLists.txt @@ -220,8 +220,6 @@ target_link_libraries(z_worldbuilder PRIVATE core_browserdispatch z_gameengine z_gameenginedevice - zi_gameengine_include - zi_gameenginedevice_include zi_always ) From c31996ba01b30259ea87095e6cd0a905d50b1f35 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Wed, 25 Jun 2025 23:46:51 +0200 Subject: [PATCH 2/2] Simplify usage of corei_gameengine_include --- Generals/Code/CMakeLists.txt | 1 + Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt | 1 - Generals/Code/Tools/ParticleEditor/CMakeLists.txt | 1 - GeneralsMD/Code/CMakeLists.txt | 1 + .../Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt | 1 - GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt | 1 - 6 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Generals/Code/CMakeLists.txt b/Generals/Code/CMakeLists.txt index 64042c36d24..33576cba689 100644 --- a/Generals/Code/CMakeLists.txt +++ b/Generals/Code/CMakeLists.txt @@ -6,6 +6,7 @@ add_library(gi_main INTERFACE) add_library(gi_always INTERFACE) target_include_directories(gi_gameengine_include INTERFACE "GameEngine/Include") +target_link_libraries(gi_gameengine_include INTERFACE corei_gameengine_include) target_include_directories(gi_libraries_include INTERFACE "Libraries/Include") target_include_directories(gi_libraries_source_wwvegas INTERFACE "Libraries/Source/WWVegas") target_include_directories(gi_main INTERFACE "Main") diff --git a/Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt b/Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt index 6396b3c62ab..b55deed1648 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt +++ b/Generals/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt @@ -2,7 +2,6 @@ add_library(g_wwdownload STATIC) set_target_properties(g_wwdownload PROPERTIES OUTPUT_NAME wwdownload) target_link_libraries(g_wwdownload PRIVATE - corei_gameengine_include corei_wwdownload gi_always gi_gameengine_include diff --git a/Generals/Code/Tools/ParticleEditor/CMakeLists.txt b/Generals/Code/Tools/ParticleEditor/CMakeLists.txt index 97a86421c37..bf7005ea58a 100644 --- a/Generals/Code/Tools/ParticleEditor/CMakeLists.txt +++ b/Generals/Code/Tools/ParticleEditor/CMakeLists.txt @@ -39,7 +39,6 @@ target_include_directories(g_particleeditor PRIVATE target_compile_definitions(g_particleeditor PRIVATE _AFXDLL) target_link_libraries(g_particleeditor PRIVATE - corei_gameengine_include corei_libraries_source_wwvegas corei_libraries_source_wwvegas_wwlib d3d8lib diff --git a/GeneralsMD/Code/CMakeLists.txt b/GeneralsMD/Code/CMakeLists.txt index 9e2dd712e56..6973be26073 100644 --- a/GeneralsMD/Code/CMakeLists.txt +++ b/GeneralsMD/Code/CMakeLists.txt @@ -6,6 +6,7 @@ add_library(zi_main INTERFACE) add_library(zi_always INTERFACE) target_include_directories(zi_gameengine_include INTERFACE "GameEngine/Include") +target_link_libraries(zi_gameengine_include INTERFACE corei_gameengine_include) target_include_directories(zi_libraries_include INTERFACE "Libraries/Include") target_include_directories(zi_libraries_source_wwvegas INTERFACE "Libraries/Source/WWVegas") target_include_directories(zi_main INTERFACE "Main") diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt index c1e5aecb31f..df1e5ef9202 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WWDownload/CMakeLists.txt @@ -2,7 +2,6 @@ add_library(z_wwdownload STATIC) set_target_properties(z_wwdownload PROPERTIES OUTPUT_NAME wwdownload) target_link_libraries(z_wwdownload PRIVATE - corei_gameengine_include corei_wwdownload zi_always zi_gameengine_include diff --git a/GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt b/GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt index 2dcf62fb150..0b410f34701 100644 --- a/GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt +++ b/GeneralsMD/Code/Tools/ParticleEditor/CMakeLists.txt @@ -39,7 +39,6 @@ target_include_directories(z_particleeditor PRIVATE target_link_libraries(z_particleeditor PRIVATE core_debug core_profile - corei_gameengine_include corei_libraries_source_wwvegas corei_libraries_source_wwvegas_wwlib d3d8lib