Begin to add some MSVC 2015 support

This commit is contained in:
Martijn Berger 2015-12-10 11:49:53 +01:00
parent 5f0cf67882
commit ffc750a4fa
2 changed files with 14 additions and 3 deletions

View File

@ -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})

View File

@ -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