diff --git a/changelog/unreleased/11691 b/changelog/unreleased/11691 new file mode 100644 index 00000000000..2b09d7cbcc7 --- /dev/null +++ b/changelog/unreleased/11691 @@ -0,0 +1,5 @@ +Bugfix: Ensure the Windows shell extension is linked statically + +We fixed a regression where https://cmake.org/cmake/help/latest/policy/CMP0091.html caused our shell extension no longer to be linked statically. + +https://github.com/owncloud/client/issues/11691 diff --git a/shell_integration/windows/CMakeLists.txt b/shell_integration/windows/CMakeLists.txt index 89bdc94dce1..1f194f24151 100644 --- a/shell_integration/windows/CMakeLists.txt +++ b/shell_integration/windows/CMakeLists.txt @@ -6,9 +6,7 @@ add_feature_info("Windows shell extensions" WITH_WINDOWS_SHELL_EXTENSIONS "") if (WITH_WINDOWS_SHELL_EXTENSIONS) find_package(nlohmann_json 3 REQUIRED) # Use static runtime for all subdirectories - foreach(buildType "" "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO") - string(REPLACE "/MD" "/MT" "CMAKE_CXX_FLAGS${buildType}" "${CMAKE_CXX_FLAGS${buildType}}") - endforeach() + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") add_subdirectory(OCContextMenu) add_subdirectory(OCOverlays)