mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-01 15:07:49 +00:00
tiff: migrate to cmake build
This commit is contained in:
parent
97c088f6a1
commit
6b9f7b010d
@ -10,21 +10,17 @@ PKG_SITE="http://www.remotesensing.org/libtiff/"
|
||||
PKG_URL="http://download.osgeo.org/libtiff/${PKG_NAME}-${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain libjpeg-turbo zlib"
|
||||
PKG_LONGDESC="libtiff is a library for reading and writing TIFF files."
|
||||
PKG_BUILD_FLAGS="+pic"
|
||||
PKG_TOOLCHAIN="configure"
|
||||
PKG_BUILD_FLAGS="+pic -gold"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-static \
|
||||
--disable-shared \
|
||||
--disable-mdi \
|
||||
--disable-jbig \
|
||||
--disable-lzma \
|
||||
--disable-zstd \
|
||||
--disable-webp \
|
||||
--enable-cxx \
|
||||
--with-jpeg-lib-dir=${SYSROOT_PREFIX}/usr/lib \
|
||||
--with-jpeg-include-dir=${SYSROOT_PREFIX}/usr/include \
|
||||
--without-x"
|
||||
|
||||
post_makeinstall_target() {
|
||||
rm -rf ${INSTALL}/usr/bin
|
||||
}
|
||||
PKG_CMAKE_OPTS_TARGET="-DBUILD_SHARED_LIBS=OFF \
|
||||
-Dtiff-tools=OFF \
|
||||
-Dtiff-tests=OFF \
|
||||
-Dtiff-contrib=OFF \
|
||||
-Dtiff-docs=OFF \
|
||||
-Dmdi=OFF \
|
||||
-Djbig=OFF \
|
||||
-Dlzma=OFF \
|
||||
-Dzstd=OFF \
|
||||
-Dwebp=OFF \
|
||||
-Dcxx=ON \
|
||||
-Djpeg=ON"
|
||||
|
@ -0,0 +1,70 @@
|
||||
From 1ab0e2696a368a556b793a0941b5365e4d9f56ef Mon Sep 17 00:00:00 2001
|
||||
From: Roger Leigh <rleigh@codelibre.net>
|
||||
Date: Sun, 29 May 2022 11:18:42 +0100
|
||||
Subject: [PATCH] Add options for disabling tools, tests, contrib and docs
|
||||
|
||||
---
|
||||
CMakeLists.txt | 33 +++++++++++++++++++++------
|
||||
1 files changed
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 770b0fac..d1dd275e 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -42,10 +42,16 @@ message(STATUS "libtiff build date: ${BUILD_DATE}")
|
||||
|
||||
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
|
||||
|
||||
+option(tiff-tools "build TIFF tools" ON)
|
||||
+option(tiff-tests "build TIFF tests" ON)
|
||||
+option(tiff-contrib "build TIFF contrib" ON)
|
||||
+option(tiff-docs "build TIFF documentation" ON)
|
||||
+option(tiff-deprecated "build TIFF deprecated features" OFF)
|
||||
|
||||
# Disable deprecated features to ensure clean build
|
||||
-add_definitions(-DTIFF_DISABLE_DEPRECATED)
|
||||
-
|
||||
+if (tiff-deprecated)
|
||||
+ add_definitions(-DTIFF_DISABLE_DEPRECATED)
|
||||
+endif()
|
||||
|
||||
# Project definition
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
@@ -135,12 +141,20 @@ include(Release)
|
||||
# Process subdirectories
|
||||
add_subdirectory(port)
|
||||
add_subdirectory(libtiff)
|
||||
-add_subdirectory(tools)
|
||||
-add_subdirectory(test)
|
||||
-add_subdirectory(contrib)
|
||||
+if(tiff-tools)
|
||||
+ add_subdirectory(tools)
|
||||
+endif()
|
||||
+if(tiff-tests)
|
||||
+ add_subdirectory(test)
|
||||
+endif()
|
||||
+if(tiff-contrib)
|
||||
+ add_subdirectory(contrib)
|
||||
+endif()
|
||||
add_subdirectory(build)
|
||||
-add_subdirectory(man)
|
||||
-add_subdirectory(html)
|
||||
+if(tiff-docs)
|
||||
+ add_subdirectory(man)
|
||||
+ add_subdirectory(html)
|
||||
+endif()
|
||||
|
||||
# pkg-config support
|
||||
include(PkgConfig)
|
||||
@@ -153,6 +167,11 @@ message(STATUS " Documentation directory: ${LIBTIFF_DOCDIR}")
|
||||
message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
|
||||
message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
|
||||
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
|
||||
+message(STATUS " Build tools: ${tiff-tools}")
|
||||
+message(STATUS " Build tests: ${tiff-tests}")
|
||||
+message(STATUS " Build contrib: ${tiff-contrib}")
|
||||
+message(STATUS " Build docs: ${tiff-docs}")
|
||||
+message(STATUS " Build deprecated features: ${tiff-deprecated}")
|
||||
message(STATUS " Enable linker symbol versioning: ${HAVE_LD_VERSION_SCRIPT}")
|
||||
message(STATUS " Support Microsoft Document Imaging: ${mdi}")
|
||||
message(STATUS " Use win32 IO: ${USE_WIN32_FILEIO}")
|
Loading…
x
Reference in New Issue
Block a user