mirror of
https://github.com/openharmony/third_party_libtiff.git
synced 2026-07-01 06:48:10 -04:00
优化编译算法支持情况
Signed-off-by: zhaona45 <zhaona45@huawei.com> Change-Id: Iaeff416b1e778623fbd4edffecc6e12d70824d1d
This commit is contained in:
@@ -35,11 +35,11 @@ set(ZIP_SUPPORT ${ZLIB_SUPPORT})
|
||||
|
||||
# libdeflate
|
||||
set(LIBDEFLATE_SUPPORT FALSE)
|
||||
find_package(Deflate)
|
||||
option(libdeflate "use libdeflate (optional for faster Deflate support, still requires zlib)" ${Deflate_FOUND})
|
||||
if (libdeflate AND Deflate_FOUND AND ZIP_SUPPORT)
|
||||
set(LIBDEFLATE_SUPPORT TRUE)
|
||||
endif()
|
||||
if(Deflate_FOUND AND NOT ZIP_SUPPORT)
|
||||
message(WARNING "libdeflate available but zlib is not. libdeflate cannot be used")
|
||||
endif()
|
||||
# find_package(Deflate)
|
||||
# option(libdeflate "use libdeflate (optional for faster Deflate support, still requires zlib)" ${Deflate_FOUND})
|
||||
# if (libdeflate AND Deflate_FOUND AND ZIP_SUPPORT)
|
||||
# set(LIBDEFLATE_SUPPORT TRUE)
|
||||
# endif()
|
||||
# if(Deflate_FOUND AND NOT ZIP_SUPPORT)
|
||||
# message(WARNING "libdeflate available but zlib is not. libdeflate cannot be used")
|
||||
# endif()
|
||||
|
||||
+14
-14
@@ -27,21 +27,21 @@
|
||||
# JBIG-KIT
|
||||
set(JBIG_SUPPORT FALSE)
|
||||
|
||||
find_package(JBIG)
|
||||
# find_package(JBIG)
|
||||
|
||||
if(JBIG_FOUND)
|
||||
set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${JBIG_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${JBIG_LIBRARIES})
|
||||
check_symbol_exists(jbg_newlen "jbig.h" HAVE_JBG_NEWLEN)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
|
||||
endif()
|
||||
# if(JBIG_FOUND)
|
||||
# set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
|
||||
# set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${JBIG_INCLUDE_DIRS})
|
||||
# set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
|
||||
# set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${JBIG_LIBRARIES})
|
||||
# check_symbol_exists(jbg_newlen "jbig.h" HAVE_JBG_NEWLEN)
|
||||
# set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
|
||||
# set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
|
||||
# endif()
|
||||
|
||||
option(jbig "use ISO JBIG compression (requires JBIT-KIT library)" ${JBIG_FOUND})
|
||||
# option(jbig "use ISO JBIG compression (requires JBIT-KIT library)" ${JBIG_FOUND})
|
||||
|
||||
if (jbig AND JBIG_FOUND)
|
||||
set(JBIG_SUPPORT TRUE)
|
||||
endif()
|
||||
# if (jbig AND JBIG_FOUND)
|
||||
# set(JBIG_SUPPORT TRUE)
|
||||
# endif()
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
# libLerc
|
||||
set(LERC_SUPPORT FALSE)
|
||||
find_package(LERC)
|
||||
option(lerc "use libLerc (required for LERC compression)" ${LERC_FOUND})
|
||||
if (lerc AND LERC_FOUND AND ZIP_SUPPORT)
|
||||
set(LERC_SUPPORT TRUE)
|
||||
endif()
|
||||
# find_package(LERC)
|
||||
# option(lerc "use libLerc (required for LERC compression)" ${LERC_FOUND})
|
||||
# if (lerc AND LERC_FOUND AND ZIP_SUPPORT)
|
||||
# set(LERC_SUPPORT TRUE)
|
||||
# endif()
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
|
||||
# liblzma2
|
||||
set(LZMA_SUPPORT FALSE)
|
||||
find_package(liblzma)
|
||||
# find_package(liblzma)
|
||||
|
||||
option(lzma "use liblzma (required for LZMA2 compression)" ${LIBLZMA_FOUND})
|
||||
if (lzma AND LIBLZMA_FOUND)
|
||||
set(LZMA_SUPPORT TRUE)
|
||||
endif()
|
||||
# option(lzma "use liblzma (required for LZMA2 compression)" ${LIBLZMA_FOUND})
|
||||
# if (lzma AND LIBLZMA_FOUND)
|
||||
# set(LZMA_SUPPORT TRUE)
|
||||
# endif()
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
# libwebp
|
||||
set(WEBP_SUPPORT FALSE)
|
||||
|
||||
find_package(WebP)
|
||||
# find_package(WebP)
|
||||
|
||||
option(webp "use libwebp (required for WEBP compression)" ${WebP_FOUND})
|
||||
# option(webp "use libwebp (required for WEBP compression)" ${WebP_FOUND})
|
||||
|
||||
if (webp AND WebP_FOUND)
|
||||
set(WEBP_SUPPORT TRUE)
|
||||
endif()
|
||||
# if (webp AND WebP_FOUND)
|
||||
# set(WEBP_SUPPORT TRUE)
|
||||
# endif()
|
||||
|
||||
+29
-29
@@ -28,37 +28,37 @@
|
||||
set(ZSTD_SUPPORT FALSE)
|
||||
set(ZSTD_USABLE FALSE)
|
||||
|
||||
find_package(ZSTD)
|
||||
# find_package(ZSTD)
|
||||
|
||||
if(ZSTD_FOUND)
|
||||
if(TARGET zstd::libzstd_shared)
|
||||
add_library(ZSTD::ZSTD ALIAS zstd::libzstd_shared)
|
||||
set(ZSTD_HAVE_DECOMPRESS_STREAM ON)
|
||||
elseif(TARGET zstd::libzstd_static)
|
||||
add_library(ZSTD::ZSTD ALIAS zstd::libzstd_static)
|
||||
set(ZSTD_HAVE_DECOMPRESS_STREAM ON)
|
||||
endif()
|
||||
# if(ZSTD_FOUND)
|
||||
# if(TARGET zstd::libzstd_shared)
|
||||
# add_library(ZSTD::ZSTD ALIAS zstd::libzstd_shared)
|
||||
# set(ZSTD_HAVE_DECOMPRESS_STREAM ON)
|
||||
# elseif(TARGET zstd::libzstd_static)
|
||||
# add_library(ZSTD::ZSTD ALIAS zstd::libzstd_static)
|
||||
# set(ZSTD_HAVE_DECOMPRESS_STREAM ON)
|
||||
# endif()
|
||||
|
||||
if(NOT DEFINED ZSTD_HAVE_DECOMPRESS_STREAM)
|
||||
set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${ZSTD_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${ZSTD_LIBRARIES})
|
||||
check_symbol_exists(ZSTD_decompressStream "zstd.h" ZSTD_HAVE_DECOMPRESS_STREAM)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
|
||||
endif()
|
||||
set(ZSTD_RECENT_ENOUGH ${ZSTD_HAVE_DECOMPRESS_STREAM})
|
||||
# if(NOT DEFINED ZSTD_HAVE_DECOMPRESS_STREAM)
|
||||
# set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
|
||||
# set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${ZSTD_INCLUDE_DIRS})
|
||||
# set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
|
||||
# set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${ZSTD_LIBRARIES})
|
||||
# check_symbol_exists(ZSTD_decompressStream "zstd.h" ZSTD_HAVE_DECOMPRESS_STREAM)
|
||||
# set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
|
||||
# set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
|
||||
# endif()
|
||||
# set(ZSTD_RECENT_ENOUGH ${ZSTD_HAVE_DECOMPRESS_STREAM})
|
||||
|
||||
if (ZSTD_RECENT_ENOUGH)
|
||||
set(ZSTD_USABLE TRUE)
|
||||
else()
|
||||
message(WARNING "Found ZSTD library, but not recent enough. Use zstd >= 1.0")
|
||||
endif()
|
||||
endif()
|
||||
# if (ZSTD_RECENT_ENOUGH)
|
||||
# set(ZSTD_USABLE TRUE)
|
||||
# else()
|
||||
# message(WARNING "Found ZSTD library, but not recent enough. Use zstd >= 1.0")
|
||||
# endif()
|
||||
# endif()
|
||||
|
||||
option(zstd "use libzstd (required for ZSTD compression)" ${ZSTD_USABLE})
|
||||
# option(zstd "use libzstd (required for ZSTD compression)" ${ZSTD_USABLE})
|
||||
|
||||
if (zstd AND ZSTD_USABLE)
|
||||
set(ZSTD_SUPPORT TRUE)
|
||||
endif()
|
||||
# if (zstd AND ZSTD_USABLE)
|
||||
# set(ZSTD_SUPPORT TRUE)
|
||||
# endif()
|
||||
|
||||
Reference in New Issue
Block a user