From ed99623ad36d454a3f15e90d52ca51d20f690b8c Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Tue, 28 Jun 2022 19:43:52 +0200 Subject: [PATCH] Adapt build job to lhelper-2 --- build.lhelper | 8 ++++++++ scripts/lhelper.sh | 20 +++++++++----------- 2 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 build.lhelper diff --git a/build.lhelper b/build.lhelper new file mode 100644 index 00000000..1fcdca3a --- /dev/null +++ b/build.lhelper @@ -0,0 +1,8 @@ +CC="${CC:-gcc}" +CXX="${CXX:-g++}" +CFLAGS= +CXXFLAGS= +LDFLAGS= +BUILD_TYPE=Release + +packages=(pcre2 freetype2 sdl2 lua) diff --git a/scripts/lhelper.sh b/scripts/lhelper.sh index 3122ff0d..8d7ccded 100644 --- a/scripts/lhelper.sh +++ b/scripts/lhelper.sh @@ -51,25 +51,23 @@ main() { pushd lhelper; bash install "${lhelper_prefix}"; popd if [[ "$OSTYPE" == "darwin"* ]]; then - CC=clang CXX=clang++ lhelper create lite-xl -n + CC=clang CXX=clang++ lhelper create build else - lhelper create lite-xl -n + lhelper create lite-xl build fi fi # Not using $(lhelper activate lite-xl) to support CI - source "$(lhelper env-source lite-xl)" - - lhelper install freetype2 - lhelper install sdl2 2.0.14-wait-event-timeout-1 - lhelper install pcre2 + source "$(lhelper env-source build)" # Help MSYS2 to find the SDL2 include and lib directories to avoid errors # during build and linking when using lhelper. - if [[ "$OSTYPE" == "msys" ]]; then - CFLAGS=-I${LHELPER_ENV_PREFIX}/include/SDL2 - LDFLAGS=-L${LHELPER_ENV_PREFIX}/lib - fi + # Francesco: not sure why this is needed. I have never observed the problem when + # building on window. + # if [[ "$OSTYPE" == "msys" ]]; then + # CFLAGS=-I${LHELPER_ENV_PREFIX}/include/SDL2 + # LDFLAGS=-L${LHELPER_ENV_PREFIX}/lib + # fi } main "$@"