summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-14 11:45:06 +0100
committermadmaxoft <github@xoft.cz>2014-01-15 11:49:26 +0100
commit20209750aa57783468dea901eb205cbc805a2c56 (patch)
tree1a797cf8f1294c6dac44d1e98f5c65f0b0ab0cb4 /CMakeLists.txt
parentMerge pull request #542 from worktycho/schedular (diff)
downloadcuberite-20209750aa57783468dea901eb205cbc805a2c56.tar
cuberite-20209750aa57783468dea901eb205cbc805a2c56.tar.gz
cuberite-20209750aa57783468dea901eb205cbc805a2c56.tar.bz2
cuberite-20209750aa57783468dea901eb205cbc805a2c56.tar.lz
cuberite-20209750aa57783468dea901eb205cbc805a2c56.tar.xz
cuberite-20209750aa57783468dea901eb205cbc805a2c56.tar.zst
cuberite-20209750aa57783468dea901eb205cbc805a2c56.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c39fe679c..6e88a8337 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,6 +60,15 @@ if(LINUX AND NOT CROSSCOMPILE)
endif()
+# Use static CRT in MSVC builds:
+if (MSVC)
+ string(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
+ string(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
+ string(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
+ string(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
+endif()
+
+
# Set lower warnings-level for the libraries:
if (MSVC)
# Remove /W3 from command line -- cannot just cancel it later with /w like in unix, MSVC produces a D9025 warning (option1 overriden by option2)