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
|
|
|
)
|
|
|
|
|
2022-03-15 19:27:34 +01:00
|
|
|
if "%*" == "static" (
|
2022-03-16 00:10:35 +01:00
|
|
|
set MESON_FLAGS=%MESON_FLAGS% -Dstatic_runtime=true -Dblob=true -Denable_r2r=false -Denable_tests=false
|
2022-03-15 19:27:34 +01:00
|
|
|
)
|
|
|
|
|
2022-06-22 00:42:14 +02:00
|
|
|
if "%*" == "release" (
|
|
|
|
set MESON_FLAGS=%MESON_FLAGS% --buildtype=release
|
|
|
|
)
|
|
|
|
|
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 (
|
2022-06-22 00:42:14 +02:00
|
|
|
meson b %MESON_FLAGS% && 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
|
|
|
)
|