aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules/UHDPackage.cmake
diff options
context:
space:
mode:
authorSteven Koo <steven.koo@ni.com>2021-07-30 13:34:34 -0500
committerAaron Rossetto <aaron.rossetto@ni.com>2021-08-04 15:22:12 -0500
commit699982eef8b29da7f94fa6d0b8216d660aa8fe40 (patch)
treed0c48a768d524e007a5da02d33a2d10846aa1732 /host/cmake/Modules/UHDPackage.cmake
parentc0637bae1e4a0ddb996cf2b7eadfad22f782874b (diff)
downloaduhd-699982eef8b29da7f94fa6d0b8216d660aa8fe40.tar.gz
uhd-699982eef8b29da7f94fa6d0b8216d660aa8fe40.tar.bz2
uhd-699982eef8b29da7f94fa6d0b8216d660aa8fe40.zip
cmake: Fix VS names and use relative for images
cmake has newer variables to identify specific Visual Studio version. This change updates to use those. This also changes how images files are globbed to be relative paths, which is useful if build files are moved from machine to machine. This case is possible in Azure Pipeline's CI. Signed-off-by: Steven Koo <steven.koo@ni.com>
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()