Skip to content

Commit e9e8406

Browse files
committed
[CORE] Move w3dview files with a cmake interface to Core and setup independent W3DView executables for Generals and Zero Hour
1 parent 975a9b8 commit e9e8406

File tree

240 files changed

+241
-179
lines changed

Some content is hidden

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

240 files changed

+241
-179
lines changed

Core/Tools/CMakeLists.txt

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Build useful tool binaries.
44
if(RTS_BUILD_CORE_TOOLS)
5-
# TODO: add subdirectory...
5+
# add_subdirectory(W3DView)
66
endif()
77

88
# Build less useful tool/test binaries.
@@ -11,3 +11,14 @@ if(RTS_BUILD_CORE_EXTRAS)
1111
add_subdirectory(CRCDiff)
1212
add_subdirectory(WW3D)
1313
endif()
14+
15+
# REMOVE THIS WHEN CORE IS PRISTINE
16+
# Add library interfaces here
17+
if(RTS_BUILD_GENERALS_TOOLS OR RTS_BUILD_ZEROHOUR_TOOLS)
18+
add_subdirectory(W3DView)
19+
endif()
20+
21+
# REMOVE THIS WHEN CORE IS PRISTINE
22+
# Add library interfaces here
23+
if(RTS_BUILD_GENERALS_EXTRAS OR RTS_BUILD_ZEROHOUR_EXTRAS)
24+
endif()

Core/Tools/W3DView/CMakeLists.txt

+199
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
set(W3DVIEW_SRC
2+
"AddToLineupDialog.cpp"
3+
"AddToLineupDialog.h"
4+
"AdvancedAnimSheet.cpp"
5+
"AdvancedAnimSheet.h"
6+
"AggregateNameDialog.cpp"
7+
"AggregateNameDialog.h"
8+
"AmbientLightDialog.cpp"
9+
"AmbientLightDialog.h"
10+
"AnimatedSoundOptionsDialog.cpp"
11+
"AnimatedSoundOptionsDialog.h"
12+
"AnimationPropPage.cpp"
13+
"AnimationPropPage.h"
14+
"AnimationSpeed.cpp"
15+
"AnimationSpeed.h"
16+
"AnimMixingPage.cpp"
17+
"AnimMixingPage.h"
18+
"AnimReportPage.cpp"
19+
"AnimReportPage.h"
20+
"AssetInfo.cpp"
21+
"AssetInfo.h"
22+
"AssetPropertySheet.cpp"
23+
"AssetPropertySheet.h"
24+
"AssetTypes.h"
25+
"BackgroundBMPDialog.cpp"
26+
"BackgroundBMPDialog.h"
27+
"BackgroundColorDialog.cpp"
28+
"BackgroundColorDialog.h"
29+
"BackgroundObjectDialog.cpp"
30+
"BackgroundObjectDialog.h"
31+
"BoneMgrDialog.cpp"
32+
"BoneMgrDialog.h"
33+
"CameraDistanceDialog.cpp"
34+
"CameraDistanceDialog.h"
35+
"CameraSettingsDialog.cpp"
36+
"CameraSettingsDialog.h"
37+
"ColorBar.cpp"
38+
"ColorBar.h"
39+
"ColorPicker.cpp"
40+
"ColorPicker.h"
41+
"ColorPickerDialogClass.cpp"
42+
"ColorPickerDialogClass.h"
43+
"ColorSelectionDialog.cpp"
44+
"ColorSelectionDialog.h"
45+
"ColorUtils.cpp"
46+
"ColorUtils.h"
47+
"DataTreeView.cpp"
48+
"DataTreeView.h"
49+
"DeviceSelectionDialog.cpp"
50+
"DeviceSelectionDialog.h"
51+
"DialogToolbar.cpp"
52+
"DialogToolbar.h"
53+
"DirectoryDialog.cpp"
54+
"DirectoryDialog.h"
55+
"EditLODDialog.cpp"
56+
"EditLODDialog.h"
57+
"EmitterColorPropPage.cpp"
58+
"EmitterColorPropPage.h"
59+
"EmitterFramePropPage.cpp"
60+
"EmitterFramePropPage.h"
61+
"EmitterGeneralPropPage.cpp"
62+
"EmitterGeneralPropPage.h"
63+
"EmitterInstanceList.cpp"
64+
"EmitterInstanceList.h"
65+
"EmitterLineGroupPropPage.cpp"
66+
"EmitterLineGroupPropPage.h"
67+
"EmitterLinePropPage.cpp"
68+
"EmitterLinePropPage.h"
69+
"EmitterParticlePropPage.cpp"
70+
"EmitterParticlePropPage.h"
71+
"EmitterPhysicsPropPage.cpp"
72+
"EmitterPhysicsPropPage.h"
73+
"EmitterPropertySheet.cpp"
74+
"EmitterPropertySheet.h"
75+
"EmitterRotationPropPage.cpp"
76+
"EmitterRotationPropPage.h"
77+
"EmitterSizePropPage.cpp"
78+
"EmitterSizePropPage.h"
79+
"EmitterUserPropPage.cpp"
80+
"EmitterUserPropPage.h"
81+
"GammaDialog.cpp"
82+
"GammaDialog.h"
83+
"Globals.cpp"
84+
"Globals.h"
85+
"GraphicView.cpp"
86+
"GraphicView.h"
87+
"HierarchyPropPage.cpp"
88+
"HierarchyPropPage.h"
89+
"LODDefs.h"
90+
"MainFrm.cpp"
91+
"MainFrm.h"
92+
"MeshPropPage.cpp"
93+
"MeshPropPage.h"
94+
"OpacitySettingsDialog.cpp"
95+
"OpacitySettingsDialog.h"
96+
"OpacityVectorDialog.cpp"
97+
"OpacityVectorDialog.h"
98+
"ParticleBlurTimeKeyDialog.cpp"
99+
"ParticleBlurTimeKeyDialog.h"
100+
"ParticleFrameKeyDialog.cpp"
101+
"ParticleFrameKeyDialog.h"
102+
"ParticleRotationKeyDialog.cpp"
103+
"ParticleRotationKeyDialog.h"
104+
"ParticleSizeDialog.cpp"
105+
"ParticleSizeDialog.h"
106+
"PlaySoundDialog.cpp"
107+
"PlaySoundDialog.h"
108+
"ResolutionDialog.cpp"
109+
"ResolutionDialog.h"
110+
"resource.h"
111+
"RestrictedFileDialog.cpp"
112+
"RestrictedFileDialog.h"
113+
"RingColorPropPage.cpp"
114+
"RingColorPropPage.h"
115+
"RingGeneralPropPage.cpp"
116+
"RingGeneralPropPage.h"
117+
"RingPropertySheet.cpp"
118+
"RingPropertySheet.h"
119+
"RingSizePropPage.cpp"
120+
"RingSizePropPage.h"
121+
"SaveSettingsDialog.cpp"
122+
"SaveSettingsDialog.h"
123+
"ScaleDialog.cpp"
124+
"ScaleDialog.h"
125+
"SceneLightDialog.cpp"
126+
"SceneLightDialog.h"
127+
"ScreenCursor.cpp"
128+
"ScreenCursor.h"
129+
"SoundEditDialog.cpp"
130+
"SoundEditDialog.h"
131+
"SphereColorPropPage.cpp"
132+
"SphereColorPropPage.h"
133+
"SphereGeneralPropPage.cpp"
134+
"SphereGeneralPropPage.h"
135+
"SpherePropertySheet.cpp"
136+
"SpherePropertySheet.h"
137+
"SphereSizePropPage.cpp"
138+
"SphereSizePropPage.h"
139+
#"SphereUtils.cpp" # Unused and does not compile
140+
#"SphereUtils.h" # Unused and does not compile
141+
"StdAfx.cpp"
142+
"StdAfx.h"
143+
#"TextureMgrDialog.cpp" # Unused
144+
#"TextureMgrDialog.h" # Unused
145+
"TexturePathDialog.cpp"
146+
"TexturePathDialog.h"
147+
#"TextureSettingsDialog.cpp" # Unused
148+
#"TextureSettingsDialog.h" # Unused
149+
"Toolbar.cpp"
150+
"Toolbar.h"
151+
"Utils.cpp"
152+
"Utils.h"
153+
"Vector3RndCombo.cpp"
154+
"Vector3RndCombo.H"
155+
"ViewerAssetMgr.cpp"
156+
"ViewerAssetMgr.h"
157+
"ViewerScene.cpp"
158+
"ViewerScene.h"
159+
"VolumeRandomDialog.cpp"
160+
"VolumeRandomDialog.h"
161+
"W3DView.cpp"
162+
"W3DView.h"
163+
"W3DViewDoc.cpp"
164+
"W3DViewDoc.h"
165+
"W3DViewView.cpp"
166+
"W3DViewView.h"
167+
)
168+
169+
add_library(corei_w3dview INTERFACE)
170+
#add_executable(core_w3dview WIN32)
171+
172+
target_sources(corei_w3dview INTERFACE ${W3DVIEW_SRC})
173+
#target_sources(core_w3dview PRIVATE ${W3DVIEW_SRC})
174+
175+
#target_link_libraries(core_w3dview PRIVATE
176+
# core_config
177+
# core_utility
178+
# core_wwstub # avoid linking GameEngine
179+
# d3d8
180+
# d3d8lib
181+
# d3dx8
182+
# dbghelplib
183+
# imm32
184+
# milesstub
185+
# Version
186+
# vfw32
187+
# winmm
188+
# z_wwaudio
189+
# z_wwvegas
190+
#)
191+
192+
if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
193+
target_sources(corei_w3dview INTERFACE W3DView.rc)
194+
#target_compile_definitions(core_w3dview PRIVATE _AFXDLL)
195+
#target_sources(core_w3dview PRIVATE W3DView.rc)
196+
#set_target_properties(core_w3dview PROPERTIES OUTPUT_NAME W3DView)
197+
#else()
198+
#set_target_properties(core_w3dview PROPERTIES OUTPUT_NAME w3dview)
199+
endif()
File renamed without changes.
File renamed without changes.

Generals/Code/Tools/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ if(RTS_BUILD_GENERALS_TOOLS)
77
add_subdirectory(ImagePacker)
88
add_subdirectory(MapCacheBuilder)
99
add_subdirectory(ParticleEditor)
10+
# add_subdirectory(W3DView)
1011
add_subdirectory(WorldBuilder)
1112
endif()
1213

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
add_executable(g_w3dview WIN32)
2+
3+
target_link_libraries(g_w3dview PRIVATE
4+
core_config
5+
core_utility
6+
core_wwstub # avoid linking GameEngine
7+
corei_w3dview # this interface gets the source files for the tool
8+
d3d8
9+
d3d8lib
10+
d3dx8
11+
dbghelplib
12+
imm32
13+
milesstub
14+
Version
15+
vfw32
16+
winmm
17+
g_wwaudio
18+
g_wwvegas
19+
)
20+
21+
if(WIN32 OR "${CMAKE_SYSTEM}" MATCHES "Windows")
22+
target_compile_definitions(g_w3dview PRIVATE _AFXDLL)
23+
set_target_properties(g_w3dview PROPERTIES OUTPUT_NAME W3DViewV)
24+
else()
25+
set_target_properties(g_w3dview PROPERTIES OUTPUT_NAME w3dviewv)
26+
endif()

GeneralsMD/Code/Libraries/Source/WWVegas/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# Interface libraries to set common defines and includes, avoid duplication later
22
add_library(z_wwcommon INTERFACE)
33

4-
target_compile_definitions(z_wwcommon INTERFACE
5-
#NOMINMAX
6-
WIN32_LEAN_AND_MEAN
7-
)
8-
94
target_link_libraries(z_wwcommon INTERFACE
105
d3d8lib
116
core_config

0 commit comments

Comments
 (0)