Skip to content

Commit 3253dad

Browse files
authored
Changed the way the MSVC MT runtime is specified
1 parent f48a381 commit 3253dad

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

CMakeLists.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,9 @@ target_compile_definitions(pluginval PRIVATE
8484
JUCE_GUI_BASICS_INCLUDE_XHEADERS=1
8585
VERSION="${CURRENT_VERSION}")
8686

87-
if(MSVC)
88-
# Statically link the runtime libraries
89-
target_compile_options(pluginval PRIVATE
90-
$<$<CONFIG:>:/MT>
91-
$<$<CONFIG:Debug>:/MTd>
92-
$<$<CONFIG:Release>:/MT>)
87+
if(MSVC AND NOT CMAKE_MSVC_RUNTIME_LIBRARY)
88+
# Default to statically linking the runtime libraries
89+
set_property(TARGET pluginval PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
9390
endif()
9491

9592
target_link_libraries(pluginval PRIVATE

0 commit comments

Comments
 (0)