[MSVC] Preliminary VS2017 support.

This commit is contained in:
Ray molenkamp 2016-11-16 20:13:58 -07:00
parent 60409841a4
commit 16e2c0ef3c
Notes: blender-bot 2023-09-13 08:48:34 +02:00
Referenced by issue #50056, Dyntopo: Sculpt brush size shortcut broken when using constant detail setting.
Referenced by issue #50057, New changes in the video encoding containers broke screencast
3 changed files with 20 additions and 4 deletions

View File

@ -129,8 +129,10 @@ if(NOT DEFINED LIBDIR)
message(STATUS "32 bit compiler detected.")
set(LIBDIR_BASE "windows")
endif()
if(MSVC_VERSION EQUAL 1900)
if(MSVC_VERSION EQUAL 1910)
message(STATUS "Visual Studio 2017 detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
elseif(MSVC_VERSION EQUAL 1900)
message(STATUS "Visual Studio 2015 detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/${LIBDIR_BASE}_vc14)
else()

View File

@ -61,6 +61,9 @@ if NOT "%1" == "" (
set BUILD_ARCH=x86
) else if "%1" == "x64" (
set BUILD_ARCH=x64
) else if "%1" == "2017" (
set BUILD_VS_VER=15
set BUILD_VS_YEAR=2017
) else if "%1" == "2015" (
set BUILD_VS_VER=14
set BUILD_VS_YEAR=2015
@ -140,7 +143,7 @@ if "%target%"=="Release" (
)
:DetectMSVC
REM Detect MSVC Installation
REM Detect MSVC Installation for 2013-2015
if DEFINED VisualStudioVersion goto msvc_detect_finally
set VALUE_NAME=ProductDir
REM Check 64 bits
@ -153,7 +156,18 @@ for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAM
if DEFINED MSVC_VC_DIR goto msvc_detect_finally
:msvc_detect_finally
if DEFINED MSVC_VC_DIR call "%MSVC_VC_DIR%\vcvarsall.bat"
if DEFINED MSVC_VC_DIR goto sanity_checks
rem MSVC Build environment 2017 and up.
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SXS\VS7" /v %BUILD_VS_VER%.0 2^>nul`) DO set MSVC_VS_DIR=%%C
if DEFINED MSVC_VS_DIR goto msvc_detect_finally_2017
REM Check 32 bits
for /F "usebackq skip=2 tokens=1-2*" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\sxs\vs7" /v %BUILD_VS_VER%.0 2^>nul`) DO set MSVC_VS_DIR=%%C
if DEFINED MSVC_VS_DIR goto msvc_detect_finally_2017
:msvc_detect_finally_2017
if DEFINED MSVC_VS_DIR call "%MSVC_VS_DIR%\Common7\Tools\VsDevCmd.bat"
:sanity_checks
REM Sanity Checks
where /Q msbuild
if %ERRORLEVEL% NEQ 0 (

View File

@ -714,7 +714,7 @@ elseif(WIN32)
if(WITH_PYTHON_INSTALL_NUMPY)
set(PYTHON_NUMPY_VERSION 1.9)
if(MSVC_VERSION EQUAL 1900)
if((MSVC_VERSION EQUAL 1900) OR (MSVC_VERSION EQUAL 1910))
set(PYTHON_NUMPY_VERSION 1.11)
endif()
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BLENDER_VERSION}/python/lib/site-packages