Skip to content

Commit f2f3c5f

Browse files
ilya-fedinjohn-preston
authored andcommitted
Don't force MSVC runtime library for non-special targets
1 parent bbb8976 commit f2f3c5f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cmake/init_target.cmake

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@ endfunction()
1313
function(init_target target_name) # init_target(my_target folder_name)
1414
target_compile_features(${target_name} PUBLIC cxx_std_20)
1515

16-
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
17-
set_target_properties(${target_name} PROPERTIES
18-
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
19-
endif()
2016
set_target_properties(${target_name} PROPERTIES
2117
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_WEAK YES
2218
XCODE_ATTRIBUTE_GCC_INLINES_ARE_PRIVATE_EXTERN YES
2319
XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN YES
2420
)
2521
if (NOT TG_OWT_SPECIAL_TARGET STREQUAL "")
2622
set_target_properties(${target_name} PROPERTIES
23+
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
2724
XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL $<IF:$<CONFIG:Debug>,0,fast>
2825
XCODE_ATTRIBUTE_LLVM_LTO $<IF:$<CONFIG:Debug>,NO,YES>
2926
)

0 commit comments

Comments
 (0)