Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions cmake/config-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ option(RTS_BUILD_OPTION_DEBUG "Build code with the \"Debug\" configuration." OFF
option(RTS_BUILD_OPTION_ASAN "Build code with Address Sanitizer." OFF)
option(RTS_BUILD_OPTION_VC6_FULL_DEBUG "Build VC6 with full debug info." OFF)
option(RTS_BUILD_OPTION_FFMPEG "Enable FFmpeg support" OFF)
option(RTS_BUILD_OPTION_RETAIL_COMPATIBLE_GAME "Build with retail-compatible game logic." ON)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can clarify that disabling this will make the game benefit from the full wrath of fixes.


if(NOT RTS_BUILD_ZEROHOUR AND NOT RTS_BUILD_GENERALS)
set(RTS_BUILD_ZEROHOUR TRUE)
Expand All @@ -24,6 +25,7 @@ add_feature_info(DebugBuild RTS_BUILD_OPTION_DEBUG "Building as a \"Debug\" buil
add_feature_info(AddressSanitizer RTS_BUILD_OPTION_ASAN "Building with address sanitizer")
add_feature_info(Vc6FullDebug RTS_BUILD_OPTION_VC6_FULL_DEBUG "Building VC6 with full debug info")
add_feature_info(FFmpegSupport RTS_BUILD_OPTION_FFMPEG "Building with FFmpeg support")
add_feature_info(RetailCompatibleGame RTS_BUILD_OPTION_RETAIL_COMPATIBLE_GAME "Building with retail-compatible game logic")

set(RTS_BUILD_OUTPUT_SUFFIX "" CACHE STRING "Suffix appended to output names of installable targets")

Expand Down Expand Up @@ -83,3 +85,15 @@ if(RTS_BUILD_OPTION_PROFILE_TRACY)
else()
add_library(core_profile_tracy INTERFACE)
endif()

if(NOT RTS_BUILD_OPTION_RETAIL_COMPATIBLE_GAME)
target_compile_definitions(core_config INTERFACE
RETAIL_COMPATIBLE_CRC=0
RETAIL_COMPATIBLE_XFER_SAVE=0
RETAIL_COMPATIBLE_PATHFINDING=0
RETAIL_COMPATIBLE_PATHFINDING_ALLOCATION=0
RETAIL_COMPATIBLE_CIRCLE_FILL_ALGORITHM=0
RETAIL_COMPATIBLE_NETWORKING=0
RETAIL_COMPATIBLE_AIGROUP=0
)
endif()
Loading