Windows CMake配置CRT类型
2024年11月5日配置cmake变量CMAKE_MSVC_RUNTIME_LIBRARY,
MultiThreaded
Compile with -MT or equivalent flag(s) to use a multi-threaded statically-linked runtime library.
MultiThreadedDLL
Compile with -MD or equivalent flag(s) to use a multi-threaded dynamically-linked runtime library.
MultiThreadedDebug
Compile with -MTd or equivalent flag(s) to use a multi-threaded statically-linked runtime library.
MultiThreadedDebugDLL
Compile with -MDd or equivalent flag(s) to use a multi-threaded dynamically-linked runtime library.
快速配置:
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>")