diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-17 11:16:55 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-04-17 11:56:02 +0200 |
commit | 4ea0059bca6dd84f10abcf52f6d6b81c1afec397 (patch) | |
tree | 2bce65b7e8caf9c4c120e900d106646db05ccc44 /configure.ac | |
parent | 4640575bd33c2d1010f3acd4fdf3cce510091716 (diff) |
VS detection: Fallback to old registry check if vswhere failed
... since on some boxes vswhere returns no results when VS 2017 is present
Change-Id: Ieabfbbc30195008ef93147d7d390eee58fa2b7f9
Reviewed-on: https://gerrit.libreoffice.org/70861
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1366ed2e0086..04e7389eebd9 100644 --- a/configure.ac +++ b/configure.ac @@ -3291,6 +3291,26 @@ find_msvc() fi done + # This fallback is needed on *some* (but not all) VS 2017 installations, where vswhere turns up + # with the empty list for unclear reason. The below hack does not work for VS 2019 anyway, so + # should be removed when upgrading baseline. + if ! test -n "$vctest"; then + for ver in $vsversions; do + reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/$ver.0/Setup/VC/ProductDir + if test -n "$regvalue"; then + vctest=$regvalue + break + fi + reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/VisualStudio/SxS/VS7/$ver.0 + if test -n "$regvalue"; then + AC_MSG_RESULT([found: $regvalue]) + PathFormat "$regvalue" + vctest=$formatted_path + break + fi + done + fi + if test -n "$vctest"; then vcnumwithdot="$ver.0" case "$vcnumwithdot" in |