[Libreoffice-commits] core.git: configure.ac

Stepas Toliautas (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 17 16:37:39 UTC 2019


 configure.ac |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit da6a947b6cffbbbc4cfad89e2cdc79f1137cca92
Author:     Stepas Toliautas <stepas.toliautas at gmail.com>
AuthorDate: Mon Dec 16 23:47:25 2019 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Dec 17 17:36:26 2019 +0100

    Tweak configure to allow Windows builds using VC++ Build Tools
    
    Since Visual Studio 2017 Microsoft offers Build Tools installer package
    which comes with MSVC++ compiler and can include most toolchains and
    libraries, but does not require Visual Studio IDE installation.
    This patch asks vswhere.exe to use path to Build Tools as compiler path
    (in case Visual Studio path is not found) and lowers 'devenv' detection
    error to warning with an explanation.
    Identical build is produced in both cases,
    and even IDE integration (creation of sln/vsproj) works as usual.
    
    Change-Id: I6176d10cc6ea2091c353eb40d13913d8adb8f85d
    Reviewed-on: https://gerrit.libreoffice.org/85245
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/configure.ac b/configure.ac
index f15253defe27..ba5e87ea1641 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3385,6 +3385,11 @@ find_msvc()
     vswhere=$formatted_path
     for ver in $vsversions; do
         vswhereoutput=`$vswhere -version "@<:@ $ver , $(expr $ver + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1`
+        # Fall back to all MS products (this includes VC++ Build Tools)
+        if ! test -n "$vswhereoutput"; then
+            AC_MSG_CHECKING([VC++ Build Tools and similar])
+            vswhereoutput=`$vswhere -products \* -version "@<:@ $ver , $(expr $ver + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1`
+        fi
         if test -n "$vswhereoutput"; then
             PathFormat "$vswhereoutput"
             vctest=$formatted_path
@@ -3510,7 +3515,7 @@ if test "$_os" = "WINNT"; then
     # MSVC 2017 devenv does not start properly from a DOS 8.3 path
     DEVENV=$(cygpath -lm "$VC_PRODUCT_DIR/../Common7/IDE/devenv.exe")
     if test ! -e "$DEVENV"; then
-        AC_MSG_ERROR([No devenv.exe found, Visual Studio installation broken?])
+        AC_MSG_WARN([No devenv.exe found - this is expected for VC++ Build Tools])
     fi
 
     dnl ===========================================================


More information about the Libreoffice-commits mailing list