[Bf-blender-cvs] [ffc750a] master: Begin to add some MSVC 2015 support
Martijn Berger
noreply at git.blender.org
Thu Dec 10 12:02:07 CET 2015
Commit: ffc750a4fafc6fe4e6fb556506becaa0e1ce8c9a
Author: Martijn Berger
Date: Thu Dec 10 11:49:53 2015 +0100
Branches: master
https://developer.blender.org/rBffc750a4fafc6fe4e6fb556506becaa0e1ce8c9a
Begin to add some MSVC 2015 support
===================================================================
M CMakeLists.txt
M source/blender/blenlib/BLI_winstuff.h
===================================================================
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1cf5d1c..354e4ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1291,13 +1291,22 @@ elseif(WIN32)
set(PLATFORM_LINKFLAGS_DEBUG "/IGNORE:4099 /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
if(NOT DEFINED LIBDIR)
+
# Setup 64bit and 64bit windows systems
if(CMAKE_CL_64)
message(STATUS "64 bit compiler detected.")
- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64_vc12)
+ set(LIBDIR_BASE "win64")
else()
message(STATUS "32 bit compiler detected.")
- set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows_vc12)
+ set(LIBDIR_BASE "windows")
+ endif()
+
+ if(MSVC_VERSION EQUAL 1900)
+ message(STATUS "Visual Studio 2015 detected.")
+ set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
+ else()
+ message(STATUS "Visual Studio 2013 detected.")
+ set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc12)
endif()
else()
message(STATUS using LIBDIR ${LIBDIR})
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index 8cf6f18..b421b7d 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -90,7 +90,9 @@ extern "C" {
#endif
/* defines for using ISO C++ conformant names */
-#define snprintf _snprintf
+#if !defined(_MSC_VER) || _MSC_VER < 1900
+# define snprintf _snprintf
+#endif
#if defined(_MSC_VER) || (defined(FREE_WINDOWS) && !defined(FREE_WINDOWS64))
# define R_OK 4
More information about the Bf-blender-cvs
mailing list