forked from osmocom/wireshark
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>
This commit is contained in:
parent
b626ad1f85
commit
0eee62affe
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue