configure.ac |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0aea45001b73d76fa9b3185ad60df1ac6d2d9b12
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Wed Nov 10 13:30:53 2021 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Nov 10 17:11:38 2021 +0100

    Only try -prerelease as a fallback
    
    Otherwise, --with-visual-studio=2022 picked the Preview version for me when 
I
    have both Preview and Current installed.
    
    Change-Id: I1c53a28877a6de80db54ed9b17b1eee0eae923c8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124963
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/configure.ac b/configure.ac
index a894323e2881..336c79925427 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3887,7 +3887,10 @@ find_msvc()
     PathFormat "$vswhere"
     vswhere=$formatted_path_unix
     for ver in $vsversions; do
-        vswhereoutput=`$vswhere -prerelease -version "@<:@ $ver , $(expr $ver 
+ 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 
-property installationPath | head -1`
+        vswhereoutput=`$vswhere -version "@<:@ $ver , $(expr $ver + 1) @:}@" 
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property 
installationPath | head -1`
+        if test -z "$vswhereoutput"; then
+            vswhereoutput=`$vswhere -prerelease -version "@<:@ $ver , $(expr 
$ver + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 
-property installationPath | head -1`
+        fi
         # Fall back to all MS products (this includes VC++ Build Tools)
         if ! test -n "$vswhereoutput"; then
             AC_MSG_CHECKING([VC++ Build Tools and similar])

Reply via email to