From c06f703157b51d412d112437268219dbbdaf0175 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 26 Mar 2018 23:23:47 +0100 Subject: [PATCH] use static CRT so people can use the debug version which is more stable currently --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6735830..76ba7d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,18 @@ cmake_minimum_required(VERSION 3.2 FATAL_ERROR) project(msgi VERSION 0.1 LANGUAGES C CXX) +set(CompilerFlags + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_RELEASE + CMAKE_C_FLAGS + CMAKE_C_FLAGS_DEBUG + CMAKE_C_FLAGS_RELEASE + ) +foreach(CompilerFlag ${CompilerFlags}) + string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}") +endforeach() + set_property(GLOBAL PROPERTY USE_FOLDERS ON) function(SET_TARGET_PRECOMPILED_HEADER Target PrecompiledHeader PrecompiledSource)