v0.2.1: statically link the Windows C++ runtime (only SDL3.dll needed)

This commit is contained in:
EnderTheCoder
2026-09-12 02:18:49 +08:00
parent 1d12e4e099
commit 702b4e29aa
3 changed files with 8 additions and 2 deletions
+6
View File
@@ -35,6 +35,12 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
option(OPENRA3_WERROR "Treat warnings as errors" OFF)
# Windows: statically link the C++ runtime (libc++, libunwind) so the .exe only
# needs SDL3.dll next to it at runtime.
if(WIN32)
add_link_options(-static)
endif()
function(openra3_target_defaults target)
target_compile_options(${target} PRIVATE -Wall -Wextra)
set_property(TARGET ${target} PROPERTY CXX_MODULE_STD ON)