diff options
author | Gerald Combs <gerald@wireshark.org> | 2016-08-05 15:39:26 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-08-06 07:28:41 +0000 |
commit | 0eee62affe9e6b935fdc37a0d72d5c27c5c7651a (patch) | |
tree | a7d9947c88bf13f4d78162310915b736fe016adc /packaging/nsis | |
parent | b626ad1f853e1e4f2e906acc7477c3924f941556 (diff) |
CMake: Look for vcredist_x??.exe in more places.
Look for the redistributable installer in the project library directory
before %VCINSTALLDIR%. This lets us ship a specific version of the
redistributable.
Change-Id: I70e5aa90ac5addba5355d1964aeb50e277d1a8d4
Ping-Bug: 12712
Reviewed-on: https://code.wireshark.org/review/16922
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'packaging/nsis')
-rw-r--r-- | packaging/nsis/CMakeLists.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt index 4072771c5b..ceef2575f7 100644 --- a/packaging/nsis/CMakeLists.txt +++ b/packaging/nsis/CMakeLists.txt @@ -90,11 +90,21 @@ if(BUILD_wireshark_gtk AND GTK_FOUND) set (GTK_DIR "\${STAGING_DIR}") endif() -# Use the vcredist that comes with Visual Studio (From MSVC 2013?) +# Look for the Visual C++ Redistributable packages in the following locations: +# - _PROJECT_LIB_DIR +# - _PROJECT_LIB_DIR/vcredist_MSVCxx +# - %VCINSTALLDIR% +# - %VCINSTALLDIR%/redist/1033 set(_vcredist_name "vcredist_${TARGET_MACHINE}.exe") +if(MSVC14) + set(_vcredist_subdir "vcredist_MSVC2015") +elseif(MSVC12) + set(_vcredist_subdir "vcredist_MSVC2013") +endif() + find_program(VCREDIST_EXE "${_vcredist_name}" - PATHS ENV "VCINSTALLDIR" - PATH_SUFFIXES "redist/1033" + PATHS "${_PROJECT_LIB_DIR}" ENV "VCINSTALLDIR" + PATH_SUFFIXES ${_vcredist_subdir} "redist/1033" ) if(VCREDIST_EXE) file(TO_NATIVE_PATH "${VCREDIST_EXE}" VCREDIST_EXE) |