Skip to content

Commit

Permalink
cmake handled edge case for MSVC_RUNTIME_DYNAMIC
Browse files Browse the repository at this point in the history
  • Loading branch information
silverqx committed Aug 21, 2024
1 parent 0cc3a45 commit 384e54d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/Modules/TinyInitDefaultVariables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ DESTINATION is encountered.")
# Also see the comment for the MSVC_RUNTIME_DYNAMIC option.
if(MSVC AND NOT TINY_VCPKG AND NOT DEFINED VCPKG_CRT_LINKAGE AND
DEFINED MSVC_RUNTIME_DYNAMIC AND
NOT MSVC_RUNTIME_DYNAMIC STREQUAL "MSVC_RUNTIME_DYNAMIC-NOTFOUND"
# Can't simply be: NOT MSVC_RUNTIME_DYNAMIC; as it would change the meaning,
# and no need to test if ends with -NOTFOUND as this is our internal thing,
# but I will test it this way because it covers the edge case and can fail
# when the value is eg. xyz-NOTFOUND:
# NOT MSVC_RUNTIME_DYNAMIC STREQUAL "MSVC_RUNTIME_DYNAMIC-NOTFOUND"
NOT MSVC_RUNTIME_DYNAMIC MATCHES "(-NOTFOUND)$"
)
if(MSVC_RUNTIME_DYNAMIC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
Expand Down

0 comments on commit 384e54d

Please sign in to comment.