Skip to content

Commit 72afa6b

Browse files
authored
[CMAKE][CORE] Move WWSaveLoad and most of WWMath to Core (#694)
1 parent c35b057 commit 72afa6b

File tree

221 files changed

+111
-34668
lines changed

Some content is hidden

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

221 files changed

+111
-34668
lines changed

Core/Libraries/Source/WWVegas/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ target_include_directories(core_wwcommon INTERFACE
1818
.
1919
WWDebug
2020
WWLib
21+
WWMath
22+
WWSaveLoad
2123
)
2224

2325
# add_subdirectory(WWAudio)
2426
add_subdirectory(WWDebug)
2527
add_subdirectory(WWLib)
26-
# add_subdirectory(WWMath)
28+
add_subdirectory(WWMath)
2729
# add_subdirectory(Wwutil)
28-
# add_subdirectory(WWSaveLoad)
30+
add_subdirectory(WWSaveLoad)
2931
add_subdirectory(WWStub)
3032
# add_subdirectory(WW3D2)
3133
# add_subdirectory(WWDownload)
@@ -40,10 +42,9 @@ target_include_directories(core_wwvegas INTERFACE
4042
WWDebug
4143
#WWDownload
4244
WWLib
43-
#WWMath
44-
#WWSaveLoad
45+
WWMath
46+
WWSaveLoad
4547
#Wwutil
46-
#wwshade
4748
)
4849

4950
target_link_libraries(core_wwvegas INTERFACE
@@ -52,7 +53,7 @@ target_link_libraries(core_wwvegas INTERFACE
5253
# core_wwdownload
5354
core_wwlib
5455
# core_wwmath
55-
# core_wwsaveload
56+
core_wwsaveload
5657
# core_wwshade
5758
# core_wwutil
5859
)
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
set(WWMATH_SRC
2+
aabox.cpp
3+
aabox.h
4+
aabtreecull.cpp
5+
aabtreecull.h
6+
aaplane.h
7+
#cardinalspline.cpp # to be moved
8+
cardinalspline.h
9+
castres.h
10+
catmullromspline.cpp
11+
catmullromspline.h
12+
colmath.cpp
13+
colmath.h
14+
#colmathaabox.cpp # to be moved
15+
colmathaabox.h
16+
#colmathaabtri.cpp # to be moved
17+
colmathfrustum.cpp
18+
colmathfrustum.h
19+
colmathinlines.h
20+
colmathline.cpp
21+
colmathline.h
22+
#colmathobbobb.cpp # to be moved
23+
colmathobbox.cpp
24+
#colmathobbtri.cpp # to be moved
25+
colmathplane.cpp
26+
colmathplane.h
27+
colmathsphere.cpp
28+
cullsys.cpp
29+
cullsys.h
30+
culltype.h
31+
curve.cpp
32+
curve.h
33+
euler.cpp
34+
euler.h
35+
frustum.cpp
36+
frustum.h
37+
gridcull.cpp
38+
gridcull.h
39+
hermitespline.cpp
40+
hermitespline.h
41+
lineseg.cpp
42+
lineseg.h
43+
lookuptable.cpp
44+
lookuptable.h
45+
matrix3.cpp
46+
matrix3.h
47+
matrix3d.cpp
48+
matrix3d.h
49+
matrix4.cpp
50+
matrix4.h
51+
#normalcone.h
52+
obbox.cpp
53+
obbox.h
54+
ode.cpp
55+
ode.h
56+
plane.h
57+
pot.cpp
58+
pot.h
59+
quat.cpp
60+
quat.h
61+
rect.h
62+
sphere.h
63+
tcbspline.cpp
64+
tcbspline.h
65+
tri.cpp
66+
tri.h
67+
v3_rnd.cpp
68+
v3_rnd.h
69+
vector2.h
70+
vector2i.h
71+
vector3.h
72+
Vector3i.h
73+
vector4.h
74+
vehiclecurve.cpp
75+
vehiclecurve.h
76+
vp.cpp
77+
vp.h
78+
wwmath.cpp
79+
wwmath.h
80+
wwmathids.h
81+
)
82+
83+
# Targets to build.
84+
add_library(core_wwmath STATIC)
85+
set_target_properties(core_wwmath PROPERTIES OUTPUT_NAME wwmath)
86+
87+
target_sources(core_wwmath PRIVATE ${WWMATH_SRC})
88+
89+
target_link_libraries(core_wwmath PRIVATE
90+
core_wwcommon
91+
)
92+
93+
# @todo Test its impact and see what to do with the legacy functions.
94+
#add_compile_definitions(core_wwmath PUBLIC ALLOW_TEMPORARIES) # Enables legacy math with "temporaries"

Generals/Code/Libraries/Source/WWVegas/WWSaveLoad/CMakeLists.txt renamed to Core/Libraries/Source/WWVegas/WWSaveLoad/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ set(WWSAVELOAD_SRC
3737
)
3838

3939
# Targets to build.
40-
add_library(g_wwsaveload STATIC)
41-
set_target_properties(g_wwsaveload PROPERTIES OUTPUT_NAME wwsaveload)
40+
add_library(core_wwsaveload STATIC)
41+
set_target_properties(core_wwsaveload PROPERTIES OUTPUT_NAME wwsaveload)
4242

43-
target_sources(g_wwsaveload PRIVATE ${WWSAVELOAD_SRC})
43+
target_sources(core_wwsaveload PRIVATE ${WWSAVELOAD_SRC})
4444

45-
target_link_libraries(g_wwsaveload PRIVATE
46-
g_wwcommon
45+
target_link_libraries(core_wwsaveload PRIVATE
46+
core_wwcommon
4747
)

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,11 @@ target_include_directories(g_wwcommon INTERFACE
1414
.
1515
WW3D2
1616
WWAudio
17-
WWMath
18-
WWSaveLoad
1917
Wwutil
2018
)
2119

2220
add_subdirectory(WWMath)
2321
add_subdirectory(Wwutil)
24-
add_subdirectory(WWSaveLoad)
2522
add_subdirectory(WW3D2)
2623
add_subdirectory(WWDownload)
2724

@@ -32,16 +29,13 @@ target_include_directories(g_wwvegas INTERFACE
3229
.
3330
WW3D2
3431
WWDownload
35-
WWMath
36-
WWSaveLoad
3732
Wwutil
3833
)
3934

4035
target_link_libraries(g_wwvegas INTERFACE
41-
core_wwvegas
36+
core_wwvegas
4237
g_ww3d2
4338
g_wwdownload
4439
g_wwmath
45-
g_wwsaveload
4640
g_wwutil
4741
)
Lines changed: 2 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,18 @@
11
set(WWMATH_SRC
2-
aabox.cpp
3-
aabox.h
4-
aabtreecull.cpp
5-
aabtreecull.h
6-
aaplane.h
72
cardinalspline.cpp
8-
cardinalspline.h
9-
castres.h
10-
catmullromspline.cpp
11-
catmullromspline.h
12-
colmath.cpp
13-
colmath.h
143
colmathaabox.cpp
15-
colmathaabox.h
164
colmathaabtri.cpp
17-
colmathfrustum.cpp
18-
colmathfrustum.h
19-
colmathinlines.h
20-
colmathline.cpp
21-
colmathline.h
225
colmathobbobb.cpp
23-
colmathobbox.cpp
246
colmathobbtri.cpp
25-
colmathplane.cpp
26-
colmathplane.h
27-
colmathsphere.cpp
28-
cullsys.cpp
29-
cullsys.h
30-
culltype.h
31-
curve.cpp
32-
curve.h
33-
euler.cpp
34-
euler.h
35-
frustum.cpp
36-
frustum.h
37-
gridcull.cpp
38-
gridcull.h
39-
hermitespline.cpp
40-
hermitespline.h
41-
lineseg.cpp
42-
lineseg.h
43-
lookuptable.cpp
44-
lookuptable.h
45-
matrix3.cpp
46-
matrix3.h
47-
matrix3d.cpp
48-
matrix3d.h
49-
matrix4.cpp
50-
matrix4.h
51-
obbox.cpp
52-
obbox.h
53-
ode.cpp
54-
ode.h
55-
plane.h
56-
pot.cpp
57-
pot.h
58-
quat.cpp
59-
quat.h
60-
rect.h
61-
sphere.h
62-
tcbspline.cpp
63-
tcbspline.h
64-
tri.cpp
65-
tri.h
66-
v3_rnd.cpp
67-
v3_rnd.h
68-
vector2.h
69-
vector2i.h
70-
vector3.h
71-
Vector3i.h
72-
vector4.h
73-
vehiclecurve.cpp
74-
vehiclecurve.h
75-
vp.cpp
76-
vp.h
77-
wwmath.cpp
78-
wwmath.h
79-
wwmathids.h
807
)
818

829
# Targets to build.
8310
add_library(g_wwmath STATIC)
84-
set_target_properties(g_wwmath PROPERTIES OUTPUT_NAME wwmath)
11+
#set_target_properties(g_wwmath PROPERTIES OUTPUT_NAME wwmath)
8512

8613
target_sources(g_wwmath PRIVATE ${WWMATH_SRC})
8714

8815
target_link_libraries(g_wwmath PRIVATE
16+
core_wwmath
8917
g_wwcommon
9018
)
91-
92-
# @todo Test its impact and see what to do with the legacy functions.
93-
#add_compile_definitions(z_wwmath PUBLIC ALLOW_TEMPORARIES) # Enables legacy math with "temporaries"

0 commit comments

Comments
 (0)