aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packaging/nsis/CMakeLists.txt9
-rw-r--r--packaging/wix/CMakeLists.txt4
2 files changed, 9 insertions, 4 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
diff --git a/packaging/wix/CMakeLists.txt b/packaging/wix/CMakeLists.txt
index 0a8a5e23a0..c83c5f3d7d 100644
--- a/packaging/wix/CMakeLists.txt
+++ b/packaging/wix/CMakeLists.txt
@@ -79,7 +79,9 @@ set (VERSION "${PROJECT_VERSION}")
set (PRODUCT_VERSION=${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}.${VERSION_BUILD})
# Use the merge module that comes with our version of Visual Studio
-if(MSVC_VERSION GREATER_EQUAL 1920)
+if(MSVC_VERSION GREATER_EQUAL 1930)
+ set (MSVC_CRT_VERSION "VC143")
+elseif(MSVC_VERSION GREATER_EQUAL 1920)
set (MSVC_CRT_VERSION "VC142")
elseif(MSVC_VERSION GREATER_EQUAL 1910)
set (MSVC_CRT_VERSION "VC141")