diff options
author | Stepas Toliautas <stepas.toliautas@gmail.com> | 2019-12-16 23:47:25 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-12-17 17:36:26 +0100 |
commit | da6a947b6cffbbbc4cfad89e2cdc79f1137cca92 (patch) | |
tree | b1a12277495c2cc4d76a38ae156c5c69167e7748 | |
parent | cb6d402ed7d0e5a32783d33da9cace1a9812031a (diff) |
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@collabora.com>
-rw-r--r-- | configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
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 =========================================================== |