2021-08-17 19:53:14 +00:00
|
|
|
@echo off
|
|
|
|
REM call preconfigure.bat
|
|
|
|
|
2021-11-14 00:57:35 +01:00
|
|
|
set MESON_FLAGS=-Dsdb_cgen=false
|
|
|
|
|
|
|
|
if "%*" == "asan" (
|
2021-11-14 17:59:38 +01:00
|
|
|
set MESON_FLAGS=%MESON_FLAGS% -Dwasan=true
|
2021-11-14 00:57:35 +01:00
|
|
|
)
|
|
|
|
|
2021-08-17 20:18:43 +00:00
|
|
|
set PATH=%CD%\prefix\bin;%PATH%
|
2021-11-14 17:59:38 +01:00
|
|
|
set WORKS=0
|
2021-09-09 11:59:11 -07:00
|
|
|
if EXIST vs (
|
2021-11-14 17:59:38 +01:00
|
|
|
meson vs %MESON_FLAGS% --backend vs --reconfigure && set WORKS=1
|
2021-09-09 11:59:11 -07:00
|
|
|
) else (
|
2021-11-14 17:59:38 +01:00
|
|
|
meson vs %MESON_FLAGS% --backend vs && set WORKS=1
|
2021-11-14 00:57:35 +01:00
|
|
|
)
|
|
|
|
|
2021-11-14 17:59:38 +01:00
|
|
|
if %WORKS% EQU 1 (
|
2021-11-14 00:57:35 +01:00
|
|
|
echo Done
|
|
|
|
) else (
|
|
|
|
echo VS failed Try running 'preconfigure'
|
|
|
|
exit /b 1
|
2021-09-09 11:59:11 -07:00
|
|
|
)
|
2021-08-17 20:18:43 +00:00
|
|
|
|
2021-11-14 17:59:38 +01:00
|
|
|
set WORKS=0
|
2021-09-09 11:59:11 -07:00
|
|
|
if EXIST b (
|
2021-11-14 17:59:38 +01:00
|
|
|
meson b %MESON_FLAGS% --reconfigure && set WORKS=1
|
2021-09-09 11:59:11 -07:00
|
|
|
) else (
|
2021-11-14 17:59:38 +01:00
|
|
|
meson b %MESON_FLAGS% --buildtype=release && set WORKS=1
|
2021-09-09 11:59:11 -07:00
|
|
|
)
|
|
|
|
|
2021-11-14 17:59:38 +01:00
|
|
|
if %WORKS% EQU 1 (
|
2021-08-17 19:53:14 +00:00
|
|
|
echo Done
|
2021-08-17 20:18:43 +00:00
|
|
|
exit /b 0
|
2021-08-17 19:53:14 +00:00
|
|
|
) else (
|
|
|
|
echo Try running 'preconfigure'
|
|
|
|
exit /b 1
|
2021-11-14 17:59:38 +01:00
|
|
|
)
|