forked from enlightenment/efl
windows: Use labels as functions.
This commit is contained in:
parent
a60f5c2c14
commit
73082c6489
|
@ -1,26 +1,36 @@
|
|||
@echo off
|
||||
@set vcvars64="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
|
||||
@setlocal
|
||||
|
||||
@Rem ---------------------------------
|
||||
@Rem Windows terminal specific options
|
||||
call :main
|
||||
|
||||
@set CC=clang-cl
|
||||
@echo C Compiler: %CC%
|
||||
@set CXX=clang-cl
|
||||
@echo C++ Compiler: %CXX%
|
||||
:check_env_vars
|
||||
echo Running the function!
|
||||
exit /B 0
|
||||
|
||||
@Rem ---------------------------------
|
||||
@Rem Windows terminal specific options
|
||||
@set CFLAGS=-fansi-escape-codes -fcolor-diagnostics %CFLAGS%
|
||||
|
||||
@Rem ---------------------------------
|
||||
@Rem Default flags
|
||||
@set CFLAGS=-Wno-language-extension-token %CFLAGS%
|
||||
:setup_flags
|
||||
@echo ------------------------------
|
||||
@echo Setting up build flags...
|
||||
|
||||
@echo Using CFLAGS=%CFLAGS%
|
||||
:: ---------------------------------
|
||||
:: Compilers
|
||||
@set CC=clang-cl
|
||||
@echo C Compiler: %CC%
|
||||
@set CXX=clang-cl
|
||||
@echo C++ Compiler: %CXX%
|
||||
|
||||
@Rem ------------------------------------------------------
|
||||
@set MESONFLAGS=^
|
||||
:: ---------------------------------
|
||||
:: Windows terminal specific options
|
||||
@set CFLAGS=-fansi-escape-codes -fcolor-diagnostics %CFLAGS%
|
||||
|
||||
:: ------------------------------------
|
||||
:: Default flags for native compilation
|
||||
@set CFLAGS=-Wno-language-extension-token %CFLAGS%
|
||||
|
||||
@echo Using CFLAGS=%CFLAGS%
|
||||
|
||||
:: ------------------------------------------------------
|
||||
@set MESONFLAGS=^
|
||||
-Dopenssl_dir="C:/Users/Tiz/source/pkg/openssl/"^
|
||||
-Dregex_include_dir="C:/Users/Tiz/source/pkg/pcre-7.0/include/"^
|
||||
-Dregex_dir="C:/Users/Tiz/source/pkg/pcre-7.0/lib/"^
|
||||
|
@ -51,12 +61,19 @@
|
|||
-Dbindings=^
|
||||
--native-file native-file-windows.txt
|
||||
|
||||
@if exist build (
|
||||
@if exist build (
|
||||
@echo "Build directory ("build") already exists. Old config will be wiped with `--wipe`."
|
||||
@set MESONFLAGS=%MESONFLAGS% --wipe
|
||||
) else (
|
||||
) else (
|
||||
@echo No Creating new build directory.
|
||||
)
|
||||
)
|
||||
exit /B 0
|
||||
|
||||
@echo on
|
||||
%vcvars64% && meson build %MESONFLAGS%
|
||||
:main
|
||||
@set vcvars64="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat"
|
||||
call :setup_flags
|
||||
|
||||
@echo on
|
||||
@echo Running meson with flags: %MESONFLAGS%
|
||||
@echo
|
||||
@%vcvars64% && meson build %MESONFLAGS%
|
||||
|
|
Loading…
Reference in New Issue