Skip to content

Commit 5e3d599

Browse files
committed
fix(build): Decouple WWMath from WWVegas to fix isolated tools CI
Extracted wwmath.h from tight coupling with the 3D engine's always.h macro definitions to establish WWMath as an independent Level 1 base library interface. Exposes Libraries/Source/WWVegas/WWMath and gamemath directly to corei_libraries_include targets, ensuring low-level utilities like Babylon and versionUpdate can compile BaseType.h without transitive rendering dependencies.
1 parent 1444641 commit 5e3d599

19 files changed

Lines changed: 240 additions & 213 deletions

File tree

Core/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ add_library(corei_always INTERFACE)
88
add_library(corei_always_no_pch INTERFACE) # Use this for Shared Libs with MFC AFX
99

1010
target_include_directories(corei_gameengine_include INTERFACE "GameEngine/Include")
11-
target_include_directories(corei_libraries_include INTERFACE "Libraries/Include")
11+
target_include_directories(corei_libraries_include INTERFACE "Libraries/Include" "Libraries/Source/WWVegas/WWMath")
12+
if (NOT IS_VS6_BUILD)
13+
target_link_libraries(corei_libraries_include INTERFACE gamemath)
14+
endif()
1215
target_include_directories(corei_libraries_source_wwvegas INTERFACE "Libraries/Source/WWVegas")
1316
target_include_directories(corei_libraries_source_wwvegas_wwlib INTERFACE "Libraries/Source/WWVegas/WWLib")
1417
target_include_directories(corei_main INTERFACE "Main")

Core/GameEngine/Include/GameClient/View.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include "Common/Snapshot.h"
3535
#include "Lib/BaseType.h"
3636
#include "WW3D2/coltype.h" ///< we don't generally do this, but we need the W3D collision types
37-
#include "WWMath/wwmath.h"
37+
#include "wwmath.h"
3838

3939
#define DEFAULT_VIEW_WIDTH 640
4040
#define DEFAULT_VIEW_HEIGHT 480

Core/GameEngine/Source/Common/Diagnostic/SimulationMathCrc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "Common/Diagnostic/SimulationMathCrc.h"
2222
#include "Common/XferCRC.h"
2323
#include "WWMath/matrix3d.h"
24-
#include "WWMath/wwmath.h"
24+
#include "wwmath.h"
2525
#include "GameLogic/FPUControl.h"
2626

2727
#include <math.h>

Core/Libraries/Include/Lib/BaseType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#pragma once
3131

3232
#include "Lib/BaseTypeCore.h"
33-
#include "WWMath/wwmath.h"
33+
#include "wwmath.h"
3434

3535
//-----------------------------------------------------------------------------
3636
typedef wchar_t WideChar; ///< multi-byte character representations

Core/Libraries/Source/WWVegas/WWMath/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ target_link_libraries(core_wwmath PRIVATE
9292
)
9393

9494
if (NOT IS_VS6_BUILD)
95-
target_link_libraries(core_wwmath PRIVATE gamemath)
95+
target_link_libraries(core_wwmath PUBLIC gamemath)
9696
endif()
9797

9898
# @todo Test its impact and see what to do with the legacy functions.

Core/Libraries/Source/WWVegas/WWMath/wwmath.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
3636

3737

38+
#include "always.h"
3839
#include "wwmath.h"
3940
#include "wwhack.h"
4041
#include "lookuptable.h"

0 commit comments

Comments
 (0)