From 67583eb1864996cb871b01dab427b9892f494ad2 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 23 Dec 2016 09:58:44 +0100 Subject: [PATCH] Changed: Define new variables for VC++ 2015 --- code/CMakeModules/FindMSVC.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/code/CMakeModules/FindMSVC.cmake b/code/CMakeModules/FindMSVC.cmake index 6a8bdd33a..dceb6f054 100644 --- a/code/CMakeModules/FindMSVC.cmake +++ b/code/CMakeModules/FindMSVC.cmake @@ -55,7 +55,15 @@ MACRO(DETECT_EXPRESS_VERSION _VERSION) ENDIF() 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") SET(MSVC_TOOLSET "120") @@ -98,7 +106,7 @@ IF(NOT VC_DIR) ELSE() SET(_COMPILER ${CMAKE_C_COMPILER}) ENDIF() - STRING(REGEX REPLACE "/bin/.+" "" VC_DIR ${_COMPILER}) + STRING(REGEX REPLACE "/(bin|BIN|Bin)/.+" "" VC_DIR ${_COMPILER}) ENDIF() SET(VC_INCLUDE_DIR "${VC_DIR}/include")