libde265: migrate to cmake build

This commit is contained in:
Rudi Heitbaum 2022-09-04 00:54:19 +00:00
parent d3478f3b5d
commit 5a4594c965
3 changed files with 83 additions and 14 deletions

View File

@ -10,18 +10,8 @@ PKG_URL="https://github.com/strukturag/libde265/releases/download/v${PKG_VERSION
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Open h.265 video codec implementation." PKG_LONGDESC="Open h.265 video codec implementation."
PKG_BUILD_FLAGS="+pic" PKG_BUILD_FLAGS="+pic"
PKG_TOOLCHAIN="configure"
PKG_CONFIGURE_OPTS_TARGET="--enable-static \ PKG_CMAKE_OPTS_TARGET="-DBUILD_SHARED_LIBS=OFF \
--disable-shared \ -DENABLE_SDL=OFF \
--disable-encoder \ -DENABLE_DECODER=OFF \
--disable-sherlock265" -DENABLE_ENCODER=OFF"
pre_configure_target() {
cd ..
./autogen.sh
}
post_configure_target() {
libtool_remove_rpath libtool
}

View File

@ -0,0 +1,53 @@
From 48056f2eb5ed03be0589bbe335dcdaa676604b28 Mon Sep 17 00:00:00 2001
From: theirix <theirix@gmail.com>
Date: Sat, 31 Oct 2020 11:57:33 +0300
Subject: [PATCH 1/2] Add CMake option DISABLE_SDL
---
CMakeLists.txt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e9f64fe6..c836a9a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,7 +20,12 @@ include (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
include(GNUInstallDirs)
include(CheckFunctionExists)
-find_package(SDL)
+option(DISABLE_SDL "Disable SDL" OFF)
+
+if (NOT DISABLE_SDL)
+ find_package(SDL)
+endif()
+
find_package(Threads REQUIRED)
CHECK_INCLUDE_FILE(malloc.h HAVE_MALLOC_H)
From c754a0342fe9bbd74bbb90d7244777cb6370804a Mon Sep 17 00:00:00 2001
From: theirix <theirix@gmail.com>
Date: Mon, 2 Nov 2020 19:03:05 +0300
Subject: [PATCH 2/2] Use ENABLE_SDL instead of DISABLE_SDL
---
CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c836a9a9..ac9d3ce8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,9 +20,9 @@ include (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
include(GNUInstallDirs)
include(CheckFunctionExists)
-option(DISABLE_SDL "Disable SDL" OFF)
+option(ENABLE_SDL "Enable SDL" ON)
-if (NOT DISABLE_SDL)
+if (ENABLE_SDL)
find_package(SDL)
endif()

View File

@ -0,0 +1,26 @@
commit 657a6ea9161d1afe780bb46c4df0e95473353e6b
Author: Rudi Heitbaum <rudi@heitbaum.com>
Date: Sun Sep 4 00:45:25 2022 +0000
Add CMake options ENABLE_DECODER and ENABLE_ENCODER
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ff93c52..160dbb1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,6 +68,13 @@ if(MSVC)
add_definitions(-DHAVE_STDBOOL_H)
endif()
+option(ENABLE_DECODER "Enable Decoder" ON)
+option(ENABLE_ENCODER "Enable Encoder" ON)
+
add_subdirectory (libde265)
-add_subdirectory (dec265)
-add_subdirectory (enc265)
+if (ENABLE_DECODER)
+ add_subdirectory (dec265)
+endif()
+if (ENABLE_ENCODER)
+ add_subdirectory (enc265)
+endif()