mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-16 04:02:03 -06:00
InstallRequiredSystemLibraries: Find VS 2017 redist directory
Use our undocumented `cmake_host_system_information` query to find the VS 2017 installation directory by asking the VS installer tool. Then look relative to that for the redist directory. Fixes: #16737
This commit is contained in:
@@ -196,6 +196,11 @@ if(MSVC)
|
|||||||
endif()
|
endif()
|
||||||
if(NOT vs VERSION_LESS 15)
|
if(NOT vs VERSION_LESS 15)
|
||||||
set(_vs_redist_paths "")
|
set(_vs_redist_paths "")
|
||||||
|
cmake_host_system_information(RESULT _vs_dir QUERY VS_${vs}_DIR) # undocumented query
|
||||||
|
if(IS_DIRECTORY "${_vs_dir}")
|
||||||
|
file(GLOB _vs_redist_paths "${_vs_dir}/VC/Redist/MSVC/*")
|
||||||
|
endif()
|
||||||
|
unset(_vs_dir)
|
||||||
else()
|
else()
|
||||||
get_filename_component(_vs_dir
|
get_filename_component(_vs_dir
|
||||||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE)
|
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${vs}.0;InstallDir]" ABSOLUTE)
|
||||||
|
|||||||
Reference in New Issue
Block a user