diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fbce4f..49b746d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,7 +89,7 @@ if (MSVC) CMAKE_C_FLAGS_RELEASE ) foreach(CompilerFlag ${CompilerFlags}) - string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") + string(REGEX REPLACE "/M[DT]d?" "/MT" ${CompilerFlag} "${${CompilerFlag}}") endforeach() add_compile_options("/EHsc") #We require exception handling else()