Merge pull request #70 from build-cpp/fix-msvc-runtime

Actually generate the set(CMAKE_MSVC_RUNTIME_LIBRARY)
main
Duncan Ogilvie 2 years ago committed by GitHub
commit cad85f0bb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -527,6 +527,15 @@ void generate_cmake(const char *path, const parser::Project *parent_project) {
if (project.project_msvc_runtime != parser::msvc_last) {
comment("Enable support for MSVC_RUNTIME_LIBRARY");
cmd("cmake_policy")("SET", "CMP0091", "NEW").endl();
switch (project.project_msvc_runtime) {
case parser::msvc_dynamic:
cmd("set")("CMAKE_MSVC_RUNTIME_LIBRARY", "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL");
break;
case parser::msvc_static:
cmd("set")("CMAKE_MSVC_RUNTIME_LIBRARY", "MultiThreaded$<$<CONFIG:Debug>:Debug>");
break;
}
}
// clang-format on

Loading…
Cancel
Save