From 8c52de58730e7a1669b095429fb306d3f172778b Mon Sep 17 00:00:00 2001 From: erbth Date: Fri, 3 Jan 2020 23:22:40 +0100 Subject: [PATCH] /MT to embed the MSVC runtime DLLs --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d9f0c7a..0ec1b4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,8 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) set(CMAKE_CXX_FLAGS_DEBUG "-gdwarf-2") elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC) set(CMAKE_CXX_FLAGS "/EHsc") - set(CMAKE_CXX_FLAGS_DEBUG "/Od /Zi") + set(CMAKE_CXX_FLAGS_DEBUG "/MT /Od /Zi") + set(CMAKE_CXX_FLAGS_RELEASE "/MT") else () MESSAGE(WARNING "C++ Compiler ${CMAKE_CXX_COMPILER_ID} is not supported, compiler flags are not set") endif ()