From f9e21cd8410d4cb52f570db634fc12ae0bcc75d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Taylor=20Ienczak=20Zanette?= Date: Wed, 4 Mar 2020 14:59:18 -0300 Subject: [PATCH] windows: Clearer build scripts and set colored output --- build.bat | 4 +++- configure.bat | 23 ++++++++++++++++----- header_checks/meson.build | 42 +++++++++++++++++++-------------------- 3 files changed, 42 insertions(+), 27 deletions(-) diff --git a/build.bat b/build.bat index 1834648fdb..f530e4d063 100644 --- a/build.bat +++ b/build.bat @@ -1 +1,3 @@ -"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.exe" -vC build +set vcvars64="C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat" +set CLICOLOR_FORCE=1 +%vcvars64% && ninja --verbose -C build diff --git a/configure.bat b/configure.bat index 767987a4c4..4fcb2e67d2 100644 --- a/configure.bat +++ b/configure.bat @@ -1,11 +1,22 @@ +@Rem --------------------------------- +@Rem Windows terminal specific options + set CC=clang-cl set CXX=clang-cl -set CFLAGS=-Wno-language-extension-token + +@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% meson build ^ - -Dopenssl_dir="C:/Users/Tiz/source/repos/openssl/"^ - -Dregex_include_dir="C:/Users/Tiz/source/repos/efl/src/lib/evil/pcre/"^ - -Dregex_dir="C:/Users/Tiz/source/repos/pcre-win-build/build-VS2019/x64/Debug"^ + -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/"^ + -Dcrypto=openssl^ -Dnls=false^ -Dsystemd=false^ -Dglib=false^ @@ -29,4 +40,6 @@ meson build ^ "-Demotion-loaders-disabler=gstreamer1,libvlc,xine"^ -Dbuild-tests=false^ -Dbuild-examples=false^ - -Dbindings= --native-file native-file-windows.txt + -Dbindings=^ + --wipe^ + --native-file native-file-windows.txt diff --git a/header_checks/meson.build b/header_checks/meson.build index f3ebcd05e3..18937be9ab 100644 --- a/header_checks/meson.build +++ b/header_checks/meson.build @@ -214,29 +214,29 @@ endif regexp = [] if sys_windows == true - if sys_windows == true - inc_arg = '-I' + get_option('regex_include_dir') - if cc.has_header('regex.h', args: inc_arg) == false - error('regex can not be found') - endif - regexp = cc.find_library('pcre', - dirs : [get_option('regex_dir')], - required: true) - else - regexp = cc.find_library('regex', - has_headers: ['regex.h', 'fnmatch.h'], - required: true) - endif - if regexp.found() == false + if sys_windows == true + inc_arg = '-I' + get_option('regex_include_dir') + if cc.has_header('regex.h', args: inc_arg) == false error('regex can not be found') - endif + endif + regexp = cc.find_library('pcre', + dirs : [get_option('regex_dir')], + required: true) + else + regexp = cc.find_library('regex', + has_headers: ['regex.h', 'fnmatch.h'], + required: true) + endif + if regexp.found() == false + error('regex can not be found') + endif else - if cc.has_header_symbol('fnmatch.h', 'fnmatch') == false - error('fnmatch can not be found') - endif - if cc.has_header_symbol('regex.h', 'regcomp') == false - error('regcomp can not be found') - endif + if cc.has_header_symbol('fnmatch.h', 'fnmatch') == false + error('fnmatch can not be found') + endif + if cc.has_header_symbol('regex.h', 'regcomp') == false + error('regcomp can not be found') + endif endif config_h.set('VMAJ', version_major)