diff options
author | Gerald Combs <gerald@wireshark.org> | 2017-06-08 10:39:05 -0700 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-06-09 17:37:07 +0000 |
commit | 9f0d22bdd1e75178332756f9abb1ae4b45b0de0b (patch) | |
tree | efacac58b9e6d24a389a124376c8fd0797ebfd2a /packaging | |
parent | c47c66cb0b0b5792b190d0f953f8f327040f5904 (diff) |
NSIS: Add support for Visual Studio 2017.
Also fixes a bug where vcredist was found in
C:\Program Files\Wireshark
Change-Id: I0bc5c7410a95677d21c2e28ba66d6a9d186fe2a9
Reviewed-on: https://code.wireshark.org/review/22044
Petri-Dish: Anders Broman <a.broman58@gmail.com>
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')
-rw-r--r-- | packaging/nsis/CMakeLists.txt | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt index 71e9fb706c..278eedc664 100644 --- a/packaging/nsis/CMakeLists.txt +++ b/packaging/nsis/CMakeLists.txt @@ -94,17 +94,35 @@ endif() # - _PROJECT_LIB_DIR # - _PROJECT_LIB_DIR/vcredist_MSVCxx # - %VCINSTALLDIR% -# - %VCINSTALLDIR%/redist/1033 +# - %VCINSTALLDIR%/redist/1033 (<= Visual Studio 2015) +# - %VCINSTALLDIR%/Redist/MSVC/* (>= Visual Studio 2017) +# MSVC_VERSION +# 1200 = VS 6.0 +# 1300 = VS 7.0 +# 1310 = VS 7.1 +# 1400 = VS 8.0 +# 1500 = VS 9.0 +# 1600 = VS 10.0 +# 1700 = VS 11.0 +# 1800 = VS 12.0 +# 1900 = VS 14.0 +# 1910 = VS 15.0 set(_vcredist_name "vcredist_${TARGET_MACHINE}.exe") -if(MSVC14) - set(_vcredist_subdir "vcredist_MSVC2015") -elseif(MSVC12) - set(_vcredist_subdir "vcredist_MSVC2013") +if(MSVC_VERSION GREATER_EQUAL 1910) + set(_ws_vcredist_subdir "vcredist_MSVC2017") + set(_ms_vcredist_subdir "Redist/MSVC/14.10.25008") +elseif(MSVC_VERSION GREATER_EQUAL 1900) + set(_ws_vcredist_subdir "vcredist_MSVC2015") + set(_ms_vcredist_subdir "redist/1033") +elseif(MSVC_VERSION GREATER_EQUAL 1800) + set(_ws_vcredist_subdir "vcredist_MSVC2013") + set(_ms_vcredist_subdir "redist/1033") endif() find_program(VCREDIST_EXE "${_vcredist_name}" PATHS "${_PROJECT_LIB_DIR}" ENV "VCINSTALLDIR" - PATH_SUFFIXES ${_vcredist_subdir} "redist/1033" + PATH_SUFFIXES ${_ws_vcredist_subdir} ${_ms_vcredist_subdir} + NO_DEFAULT_PATH ) if(VCREDIST_EXE) file(TO_NATIVE_PATH "${VCREDIST_EXE}" VCREDIST_EXE) |