From a1aebe338649c73350f38e9c684910480ac931cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 10 Jun 2024 18:45:22 +0200 Subject: [PATCH] Build libheif with cmake --- manifest.toml | 4 ++-- scripts/_common.sh | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/manifest.toml b/manifest.toml index 018a0a7..2df8f24 100644 --- a/manifest.toml +++ b/manifest.toml @@ -102,8 +102,8 @@ ram.runtime = "200M" "libheif-dev", "build-essential", "pkg-config", - "autoconf", - "automake", + "cmake", + "ninja", "libx265-dev", "libde265-dev", "libaom-dev", diff --git a/scripts/_common.sh b/scripts/_common.sh index 1ce2711..db039c0 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -29,14 +29,15 @@ function build_libheif { export GOCACHE="$install_dir/build/.cache" pushd "$install_dir/libheif" || ynh_die - # mkdir -p "$install_dir/local" - # chown -R $app:$app "$install_dir/local" - ynh_exec_as "$app" ./autogen.sh 2>&1 - ynh_exec_as "$app" ./configure --prefix="$install_dir/local" --disable-gdk-pixbuf 2>&1 - ynh_exec_as "$app" make clean 2>&1 - ynh_exec_as "$app" make 2>&1 - ynh_exec_as "$app" make install 2>&1 - ynh_exec_as "$app" make clean 2>&1 + mkdir build + pushd build + ynh_exec_and_print_stderr_only_if_error ynh_exec_as "$app" \ + cmake --preset=release --prefix="$install_dir/local" -DWITH_GDK_PIXBUF=OFF -G Ninja .. + ynh_exec_and_print_stderr_only_if_error ynh_exec_as "$app" \ + ninja + ynh_exec_and_print_stderr_only_if_error ynh_exec_as "$app" \ + ninja install + popd popd || ynh_die }