Closed MaartenBent closed 2 weeks ago
Thanks! Should anything here be backported?
Yes, it can be backported. But I didn't fix the issue with CMAKE_MSVC_RUNTIME_LIBRARY
yet.
Could you apply the following?
diff --git "a/build/cmake/options.cmake" "b/build/cmake/options.cmake"
index bcda6164282..7cfcef1afe0 100644
--- "a/build/cmake/options.cmake"
+++ "b/build/cmake/options.cmake"
@@ -37,7 +37,7 @@ mark_as_advanced(wxBUILD_DEBUG_LEVEL)
if(NOT APPLE)
set(wxBUILD_USE_STATIC_RUNTIME_DEFAULT OFF)
- if(MSVC AND CMAKE_MSVC_RUNTIME_LIBRARY)
+ if(MSVC AND CMAKE_MSVC_RUNTIME_LIBRARY AND NOT CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "DLL")
set(wxBUILD_USE_STATIC_RUNTIME_DEFAULT ON)
endif()
wx_option(wxBUILD_USE_STATIC_RUNTIME "Link using the static runtime library" ${wxBUILD_USE_STATIC_RUNTIME_DEFAULT})
Oops, sorry, I've looked at this too quickly and thought this was finished. I'll push the missing change soon.
This was broken with recent CMake versions, see wx-dev discussion https://groups.google.com/g/wx-dev/c/0ECwYNf8TfU