diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4f0721e1d..54a267c43 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -51,7 +51,17 @@ execute_process(COMMAND git rev-parse --short HEAD OUTPUT_VARIABLE GIT_VERSION E if (MSVC) if (CMAKE_BUILD_TYPE MATCHES Debug) add_compile_options(-DEBUG -Od) + if (SLIC3R_STATIC) + add_compile_options(-MTd) + else(SLIC3R_STATIC) + add_compile_options(-MDd) + endif(SLIC3R_STATIC) elseif (CMAKE_BUILD_TYPE MATCHES Release) + if (SLIC3R_STATIC) + add_compile_options(-MTd) + else(SLIC3R_STATIC) + add_compile_options(-MD) + endif(SLIC3R_STATIC) elseif (CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) add_compile_options(-DEBUG -O2) endif()