summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
committerHowaner <franzi.moos@googlemail.com>2014-11-18 14:56:32 +0100
commit42120e2ea5db0cdb9920ff1c5efef33e0f496d48 (patch)
tree20ba1ae0a53f757cb8814b6cd6a466fe5acf1308 /CMakeLists.txt
parentFixed compile errors. (diff)
parentMerge pull request #1598 from mc-server/SignEditor (diff)
downloadcuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.gz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.bz2
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.lz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.xz
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.tar.zst
cuberite-42120e2ea5db0cdb9920ff1c5efef33e0f496d48.zip
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 188cf81e3..d4e9d41e8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,6 +37,21 @@ if(DEFINED ENV{MCSERVER_BUILD_ID})
endif()
endif()
+# We need C++11 features, Visual Studio has those from VS2012, but it needs a new platform toolset for those; VS2013 supports them natively:
+# Adapted from http://binglongx.wordpress.com/2013/06/28/set-non-default-platform-toolset-in-cmake/
+if(MSVC OR MSVC_IDE)
+ if( MSVC_VERSION LESS 1700 ) # VC10- / VS2010-
+ message(FATAL_ERROR "The project requires C++11 features. "
+ "You need at least Visual Studio 11 (Microsoft Visual Studio 2012), "
+ "with Microsoft Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012).")
+ elseif( MSVC_VERSION EQUAL 1700 ) # VC11 / VS2012
+ message( "VC11: using Microsoft Visual Studio 2012 "
+ "with Microsoft Visual C++ Compiler Nov 2012 CTP (v120_CTP_Nov2012)" )
+ set(CMAKE_GENERATOR_TOOLSET "v120_CTP_Nov2012" CACHE STRING "Platform Toolset" FORCE)
+ else() # VC12+, assuming C++11 supported.
+ endif()
+endif()
+
# This has to be done before any flags have been set up.
if(${BUILD_TOOLS})
add_subdirectory(Tools/MCADefrag/)
@@ -81,7 +96,6 @@ set(SQLITECPP_BUILD_TESTS OFF CACHE BOOL "Build and run tests."
set(SQLITECPP_INTERNAL_SQLITE OFF CACHE BOOL "Add the internal SQLite3 source to the project." FORCE)
# Include all the libraries:
-add_subdirectory(lib/inifile/)
add_subdirectory(lib/jsoncpp/)
add_subdirectory(lib/zlib/)
add_subdirectory(lib/lua/)