aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules/UHDPackage.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'host/cmake/Modules/UHDPackage.cmake')
-rw-r--r--host/cmake/Modules/UHDPackage.cmake14
1 files changed, 9 insertions, 5 deletions
diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake
index 3ce269180..4d507493b 100644
--- a/host/cmake/Modules/UHDPackage.cmake
+++ b/host/cmake/Modules/UHDPackage.cmake
@@ -80,16 +80,20 @@ if(${CPACK_GENERATOR} STREQUAL NSIS)
check_type_size("void*[8]" BIT_WIDTH BUILTIN_TYPES_ONLY)
# If CMake option given, specify MSVC version in installer filename
if(SPECIFY_MSVC_VERSION)
- if(MSVC90) # Visual Studio 2008 (9.0)
+ if(MSVC_TOOLSET_VERSION EQUAL 90) # Visual Studio 2008 (9.0)
set(MSVC_VERSION "VS2008")
- elseif(MSVC10) # Visual Studio 2010 (10.0)
+ elseif(MSVC_TOOLSET_VERSION EQUAL 100) # Visual Studio 2010 (10.0)
set(MSVC_VERSION "VS2010")
- elseif(MSVC11) # Visual Studio 2012 (11.0)
+ elseif(MSVC_TOOLSET_VERSION EQUAL 110) # Visual Studio 2012 (11.0)
set(MSVC_VERSION "VS2012")
- elseif(MSVC12) # Visual Studio 2013 (12.0)
+ elseif(MSVC_TOOLSET_VERSION EQUAL 120) # Visual Studio 2013 (12.0)
set(MSVC_VERSION "VS2013")
- elseif(MSVC14) # Visual Studio 2015 (14.0)
+ elseif(MSVC_TOOLSET_VERSION EQUAL 140) # Visual Studio 2015 (14.0)
set(MSVC_VERSION "VS2015")
+ elseif(MSVC_TOOLSET_VERSION EQUAL 141) # Visual Studio 2017 (14.1)
+ set(MSVC_VERSION "VS2017")
+ elseif(MSVC_TOOLSET_VERSION EQUAL 142) # Visual Studio 2019 (14.2)
+ set(MSVC_VERSION "VS2019")
endif()
set(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_Win${BIT_WIDTH}_${MSVC_VERSION}" CACHE INTERNAL "")
else()