Skip to content

Commit 2989b9e

Browse files
committed
Win32: Make SolveSpace grea...static again
For some reason the /MT options in the `CMAKE_C_FLAGS_RELEASE_INIT` etc. CMake targets stopped working at some point and SolveSpace became linked to the DLL versions of the C/C++ runtime (MSVCP140.DLL, VCRUNTIME140.DLL). We do not like this. Therefore: Use the proper "modern" CMake incantation to make SolveSpace static again ;-) https://cmake.org/cmake/help/latest/prop_tgt/MSVC_RUNTIME_LIBRARY.html The OpenMP build still depends on VCOMP140.DLL but this seems unavoidable. https://stackoverflow.com/questions/37037733/statically-link-with-microsoft-crt-and-openmp godotengine/godot#14935
1 parent 0df1ba7 commit 2989b9e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cmake/c_flag_overrides.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ if(MSVC)
33
set(CMAKE_C_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG")
44
set(CMAKE_C_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG")
55
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG")
6+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
67
endif()
78

89
if(EMSCRIPTEN)

0 commit comments

Comments
 (0)