mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-31 13:24:13 +02:00
CI: Use Visual Studio 2019 for the MSVC CI
...and add ability to select target platform for calling vcvarsall.bat, so that we can accomodate 32-bit builds and possibly ARM64 builds in the CI if we need to.
This commit is contained in:
@@ -1,15 +1,21 @@
|
||||
@echo on
|
||||
:: vcvarsall.bat sets various env vars like PATH, INCLUDE, LIB, LIBPATH for the
|
||||
:: specified build architecture
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
|
||||
|
||||
:: Remove quotes from script args
|
||||
setlocal enabledelayedexpansion
|
||||
set args=
|
||||
set stash_plat=0
|
||||
|
||||
for %%x in (%*) do (
|
||||
set args=!args! %%~x
|
||||
if "%%x" == "--plat" set stash_plat=1
|
||||
if "!stash_plat!" == "0" set args=!args! %%~x
|
||||
if "!stash_plat!" == "1" if /i not "%%x" == "--plat" set plat=%%x & set stash_plat=0
|
||||
)
|
||||
set args=%args:~1%
|
||||
if "!plat!" == "" set plat=x64
|
||||
|
||||
:: vcvarsall.bat sets various env vars like PATH, INCLUDE, LIB, LIBPATH for the
|
||||
:: specified build architecture
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" !plat!
|
||||
|
||||
pip3 install --upgrade --user meson==1.4.2 || goto :error
|
||||
meson setup %args% _build || goto :error
|
||||
|
Reference in New Issue
Block a user