Changed: Define new variables for VC++ 2015

This commit is contained in:
kervala 2016-12-23 09:58:44 +01:00
parent dcfed04005
commit 67583eb186

View file

@ -55,7 +55,15 @@ MACRO(DETECT_EXPRESS_VERSION _VERSION)
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()
IF(MSVC12) IF(MSVC14)
DETECT_VC_VERSION("14.0")
SET(MSVC_TOOLSET "140")
IF(NOT MSVC14_REDIST_DIR)
# If you have VC++ 2015 Express, put x64/Microsoft.VC140.CRT/*.dll in ${EXTERNAL_PATH}/redist
SET(MSVC14_REDIST_DIR "${EXTERNAL_PATH}/redist")
ENDIF()
ELSEIF(MSVC12)
DETECT_VC_VERSION("12.0") DETECT_VC_VERSION("12.0")
SET(MSVC_TOOLSET "120") SET(MSVC_TOOLSET "120")
@ -98,7 +106,7 @@ IF(NOT VC_DIR)
ELSE() ELSE()
SET(_COMPILER ${CMAKE_C_COMPILER}) SET(_COMPILER ${CMAKE_C_COMPILER})
ENDIF() ENDIF()
STRING(REGEX REPLACE "/bin/.+" "" VC_DIR ${_COMPILER}) STRING(REGEX REPLACE "/(bin|BIN|Bin)/.+" "" VC_DIR ${_COMPILER})
ENDIF() ENDIF()
SET(VC_INCLUDE_DIR "${VC_DIR}/include") SET(VC_INCLUDE_DIR "${VC_DIR}/include")