Skip to content

Commit ccf4584

Browse files
authored
[CMAKE][CORE] Move WWLib and WWDebug to Core (#663)
1 parent 2eaf1dc commit ccf4584

File tree

309 files changed

+105
-38156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

309 files changed

+105
-38156
lines changed

Core/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# c stands for core, i stands for Interface
22
add_library(corei_libraries_include INTERFACE)
3+
add_library(corei_libraries_source_wwvegas INTERFACE)
4+
add_library(corei_libraries_source_wwvegas_wwdebug INTERFACE)
5+
add_library(corei_libraries_source_wwvegas_wwlib INTERFACE)
36
add_library(corei_always INTERFACE)
47

58
target_include_directories(corei_libraries_include INTERFACE "Libraries/Include")
9+
target_include_directories(corei_libraries_source_wwvegas INTERFACE "Libraries/Source/WWVegas")
10+
target_include_directories(corei_libraries_source_wwvegas_wwdebug INTERFACE "Libraries/Source/WWVegas/WWDebug")
11+
target_include_directories(corei_libraries_source_wwvegas_wwlib INTERFACE "Libraries/Source/WWVegas/WWLib")
612
target_link_libraries(corei_always INTERFACE
713
core_utility
814
corei_libraries_include

Core/Libraries/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# WW common libraries decended from earliest C&C games
2-
#add_subdirectory(Source/WWVegas)
2+
add_subdirectory(Source/WWVegas)
33

44
# profiling library
55
#add_subdirectory(Source/profile)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Interface libraries to set common defines and includes, avoid duplication later
2+
add_library(core_wwcommon INTERFACE)
3+
4+
target_compile_definitions(core_wwcommon INTERFACE
5+
#NOMINMAX
6+
WIN32_LEAN_AND_MEAN
7+
)
8+
9+
target_link_libraries(core_wwcommon INTERFACE
10+
d3d8lib
11+
core_config
12+
core_utility
13+
milesstub
14+
stlport
15+
)
16+
17+
target_include_directories(core_wwcommon INTERFACE
18+
.
19+
WWDebug
20+
WWLib
21+
)
22+
23+
# add_subdirectory(WWAudio)
24+
add_subdirectory(WWDebug)
25+
add_subdirectory(WWLib)
26+
# add_subdirectory(WWMath)
27+
# add_subdirectory(Wwutil)
28+
# add_subdirectory(WWSaveLoad)
29+
# add_subdirectory(WW3D2)
30+
# add_subdirectory(WWDownload)
31+
# add_subdirectory(wwshade)
32+
33+
# Helpful interface to bundle the ww modules together.
34+
add_library(core_wwvegas INTERFACE)
35+
36+
target_include_directories(core_wwvegas INTERFACE
37+
.
38+
#WW3D2
39+
WWDebug
40+
#WWDownload
41+
WWLib
42+
#WWMath
43+
#WWSaveLoad
44+
#Wwutil
45+
#wwshade
46+
)
47+
48+
target_link_libraries(core_wwvegas INTERFACE
49+
# core_ww3d2
50+
core_wwdebug
51+
# core_wwdownload
52+
core_wwlib
53+
# core_wwmath
54+
# core_wwsaveload
55+
# core_wwshade
56+
# core_wwutil
57+
)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Set source files
2+
set(WWDEBUG_SRC
3+
wwdebug.cpp
4+
wwdebug.h
5+
wwhack.h
6+
wwmemlog.cpp
7+
wwmemlog.h
8+
wwprofile.cpp
9+
wwprofile.h
10+
)
11+
12+
# Targets to build.
13+
add_library(core_wwdebug STATIC)
14+
set_target_properties(core_wwdebug PROPERTIES OUTPUT_NAME wwdebug)
15+
16+
target_sources(core_wwdebug PRIVATE ${WWDEBUG_SRC})
17+
18+
target_link_libraries(core_wwdebug PRIVATE
19+
core_wwcommon
20+
corei_always
21+
)

GeneralsMD/Code/Libraries/Source/WWVegas/WWDebug/wwdebug.h renamed to Core/Libraries/Source/WWVegas/WWDebug/wwdebug.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ void WWDebug_DBWin32_Message_Handler( const char * message);
110110
** WWDEBUG_SAY(("dir = %f\n",dir));
111111
*/
112112

113-
#include "../../../../GameEngine/Include/Common/Debug.h"
113+
// TheSuperHackers @compile feliwir 12/04/2025 Both Debug headers are identical. Use ZH.
114+
#include "../../../../../GeneralsMD/Code/GameEngine/Include/Common/Debug.h"
114115

115116
#ifdef DEBUG_LOGGING
116117
#define WWDEBUG_SAY(x) DEBUG_LOG(x)

0 commit comments

Comments
 (0)