aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDFOVIT <71126069+DFOVIT@users.noreply.github.com>2022-01-07 12:24:17 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2022-01-13 01:14:26 +0530
commiteeb110ab024b505f326ae907393cae761666ace0 (patch)
tree3f4df24b92e9ec5cbac81b7733b4f77571129ee1
parent5b3094d43bae45b779fcbd859d4a883c8f6c9d77 (diff)
downloadmeson-eeb110ab024b505f326ae907393cae761666ace0.zip
meson-eeb110ab024b505f326ae907393cae761666ace0.tar.gz
meson-eeb110ab024b505f326ae907393cae761666ace0.tar.bz2
Search for Visual Studio Express when activating VS env
Visual Studio Express does not come with the 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64' workload. This adds a check for the 'Microsoft.VisualStudio.Workload.WDExpress' workload. Non-express versions take precedence over express versions when activating.
-rw-r--r--mesonbuild/mesonlib/vsenv.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/mesonlib/vsenv.py b/mesonbuild/mesonlib/vsenv.py
index 2ba2b90..8563b7d 100644
--- a/mesonbuild/mesonlib/vsenv.py
+++ b/mesonbuild/mesonlib/vsenv.py
@@ -56,6 +56,7 @@ def _setup_vsenv(force: bool) -> bool:
'-prerelease',
'-requiresAny',
'-requires', 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
+ '-requires', 'Microsoft.VisualStudio.Workload.WDExpress',
'-products', '*',
'-utf8',
'-format',
@@ -71,6 +72,9 @@ def _setup_vsenv(force: bool) -> bool:
bat_path = bat_root / 'VC/Auxiliary/Build/vcvarsx86_arm64.bat'
else:
bat_path = bat_root / 'VC/Auxiliary/Build/vcvars64.bat'
+ # if VS is not found try VS Express
+ if not bat_path.exists():
+ bat_path = bat_root / 'VC/Auxiliary/Build/vcvarsx86_amd64.bat'
if not bat_path.exists():
raise MesonException(f'Could not find {bat_path}')