Skip to content
Snippets Groups Projects
Commit 24770298 authored by Campbell Barton's avatar Campbell Barton
Browse files

CMake: add _WIN32_WINNT MSVC define to match scons

parent 4903544c
No related branches found
No related tags found
No related merge requests found
......@@ -973,11 +973,24 @@ elseif(WIN32)
set(PLATFORM_LINKLIBS ${PLATFORM_LINKLIBS} dxguid)
endif()
add_definitions(/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB)
add_definitions(
-D_CRT_NONSTDC_NO_DEPRECATE
-D_CRT_SECURE_NO_DEPRECATE
-D_SCL_SECURE_NO_DEPRECATE
-D_CONSOLE
-D_LIB
)
# MSVC11 needs _ALLOW_KEYWORD_MACROS to build
if(MSVC11 OR MSVC12)
add_definitions(/D_ALLOW_KEYWORD_MACROS)
if(NOT MSVC_VERSION VERSION_LESS 1700)
add_definitions(-D_ALLOW_KEYWORD_MACROS)
endif()
if(CMAKE_CL_64)
# We want to support Vista level ABI for x64
if(NOT MSVC_VERSION VERSION_LESS 1700)
add_definitions(-D_WIN32_WINNT=0x600)
endif()
endif()
set(CMAKE_CXX_FLAGS "/nologo /J /Gd /EHsc /MP" CACHE STRING "MSVC MT C++ flags " FORCE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment