diff options
author | Gerald Combs <gerald@wireshark.org> | 2022-01-15 18:24:55 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2022-01-15 18:24:55 -0800 |
commit | 816f858361b57e671c8fd6113890009037135e3f (patch) | |
tree | 0fdff337b142f9b1523c774c706a048e7b8439b3 /packaging/nsis/CMakeLists.txt | |
parent | 5f19c5b6efb2a74a7738131c99e2c54e6cc3cbe0 (diff) |
CMake+packaging: Updates for Visual Studio 2022
Update the NSIS and WiX CMakeLists for Visual Studio 2022.
Diffstat (limited to 'packaging/nsis/CMakeLists.txt')
-rw-r--r-- | packaging/nsis/CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt index 07477800bf..7d9eda0fae 100644 --- a/packaging/nsis/CMakeLists.txt +++ b/packaging/nsis/CMakeLists.txt @@ -81,8 +81,11 @@ endif() # 1912 = VS2017 15.5 / 14.12 # 1913 = VS2017 15.6 / 14.13 # 1914 = VS2017 15.7 / 14.14 -set(_vcredist_name "vcredist_${TARGET_MACHINE}.exe") -if(MSVC_VERSION GREATER_EQUAL 1920) +set(_vcredist_dot_name "vc_redist.${TARGET_MACHINE}.exe") # Visual Studio 2022 and later +set(_vcredist_underscore_name "vcredist_${TARGET_MACHINE}.exe") # Visual Studio 2019 and earlier +if(MSVC_VERSION GREATER_EQUAL 1930) + set(_ws_vcredist_subdir "vcredist_MSVC2022") +elseif(MSVC_VERSION GREATER_EQUAL 1920) set(_ws_vcredist_subdir "vcredist_MSVC2019") set(_msvs_version 15.0) # Doesn't appear to be set elseif(MSVC_VERSION GREATER_EQUAL 1910) @@ -115,7 +118,7 @@ if(MSVC_VERSION GREATER_EQUAL 1910 AND VCINSTALLDIR) "${VCINSTALLDIR}/Redist/MSVC/14.*.*") endif() -find_program(VCREDIST_EXE "${_vcredist_name}" +find_program(VCREDIST_EXE NAMES "${_vcredist_dot_name}" "${_vcredist_underscore_name}" PATHS "${_PROJECT_LIB_DIR}" $ENV{VCToolsRedistDir} "${VCINSTALLDIR}" PATH_SUFFIXES ${_ws_vcredist_subdir} ${_ms_vcredist_subdir} NO_DEFAULT_PATH |