Setting the MSVC runtime in CMake

This functionality will be improved with the release of cmake-3.15.

It should be a matter of setting CMAKE_MSVC_RUNTIME_LIBRARY, for example (from docs) to set “multi-threaded statically-linked runtime library with or without debug information depending on the configuration”:

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

Leave a Comment