mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
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>
This commit is contained in:
parent
ee7dd0b1f9
commit
42731d8471
@ -536,7 +536,7 @@ UHD_INSTALL(
|
||||
########################################################################
|
||||
if(DEFINED UHD_IMAGES_SRC_DIR AND EXISTS "${UHD_IMAGES_SRC_DIR}")
|
||||
message(STATUS "Reading images from directory `${UHD_IMAGES_SRC_DIR}'")
|
||||
file(GLOB_RECURSE _image_files "${UHD_IMAGES_SRC_DIR}/*")
|
||||
file(GLOB_RECURSE _image_files RELATIVE "${CMAKE_SOURCE_DIR}" "${UHD_IMAGES_SRC_DIR}/*")
|
||||
message(STATUS "These images files will be installed/packaged:")
|
||||
foreach(_img ${_image_files})
|
||||
message(STATUS " ${_img}")
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user