Skip to content

Commit 17d0122

Browse files
author
Grok Compression
committed
libtiff: upgrade to v4.7.1
1 parent 8720ab3 commit 17d0122

File tree

315 files changed

+10910
-2461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

315 files changed

+10910
-2461
lines changed

thirdparty/libtiff/CMakeLists.txt

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,15 @@
2424
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
2525
# OF THIS SOFTWARE.
2626

27-
cmake_minimum_required(VERSION 3.9.0)
27+
cmake_minimum_required(VERSION 3.10)
2828

29-
# Default policy is from 3.9.0
30-
cmake_policy(VERSION 3.9.0)
29+
# Default policy is from 3.10
30+
cmake_policy(VERSION 3.10)
31+
32+
if(POLICY CMP0074)
33+
# Allow find_package() to use the ZLIB_ROOT variable, if available.
34+
cmake_policy(SET CMP0074 NEW)
35+
endif()
3136

3237
# Find CMake modules in cmake/
3338
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
@@ -50,14 +55,26 @@ else()
5055
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
5156
endif()
5257

58+
if (BUILD_SHARED_LIBS)
59+
set(TIFF_STATIC_LIBS_DEFAULT FALSE)
60+
else()
61+
set(TIFF_STATIC_LIBS_DEFAULT TRUE)
62+
endif()
63+
64+
option(tiff-static "build TIFF static libraries" ${TIFF_STATIC_LIBS_DEFAULT})
5365
option(tiff-tools "build TIFF tools" ON)
54-
option(tiff-tools-unsupported "build unsupported TIFF tools" OFF)
5566
option(tiff-tests "build TIFF tests" ON)
5667
option(tiff-contrib "build TIFF contrib" ON)
5768
option(tiff-docs "build TIFF documentation" ON)
5869
option(tiff-deprecated "build TIFF deprecated features" OFF)
5970
option(tiff-install "install TIFF targets" ${TIFF_INSTALL_DEFAULT})
6071

72+
if (tiff-static)
73+
set(TIFF_BUILD_LIB_VALUE STATIC)
74+
else()
75+
set(TIFF_BUILD_LIB_VALUE SHARED)
76+
endif()
77+
6178
# Disable deprecated features to ensure clean build
6279
if (tiff-deprecated)
6380
add_definitions(-DTIFF_DISABLE_DEPRECATED)
@@ -125,6 +142,9 @@ include(WebPCodec)
125142
# Option for C++ libtiffxx library
126143
include(CXXLibrary)
127144

145+
# Checks for OpenGL support
146+
include(OpenGLChecks)
147+
128148
# Windows support
129149
include(WindowsSupport)
130150

@@ -144,9 +164,6 @@ add_subdirectory(libtiff)
144164
if(tiff-tools)
145165
add_subdirectory(tools)
146166
endif()
147-
if(tiff-tools-unsupported)
148-
add_subdirectory(tools/unsupported)
149-
endif()
150167
if(tiff-tests)
151168
add_subdirectory(test)
152169
endif()
@@ -177,7 +194,6 @@ message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
177194
message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
178195
message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
179196
message(STATUS " Build tools: ${tiff-tools}")
180-
message(STATUS " Build tools-unsupported: ${tiff-tools-unsupported}")
181197
message(STATUS " Build tests: ${tiff-tests}")
182198
message(STATUS " Build contrib: ${tiff-contrib}")
183199
message(STATUS " Build docs: ${tiff-docs}")
@@ -213,7 +229,7 @@ else()
213229
message(STATUS " Old JPEG support: Requested:${old-jpeg} Availability:${JPEG_SUPPORT} Support:${OJPEG_SUPPORT} (Depends on JPEG Support)")
214230
endif()
215231
if(JPEG_SUPPORT AND HAVE_JPEGTURBO_DUAL_MODE_8_12)
216-
message(STATUS " JPEG 8/12 bit dual mode: Support: yes (libjpeg turbo >= 2.2 dual mode)")
232+
message(STATUS " JPEG 8/12 bit dual mode: Support: yes (libjpeg turbo >= 3.0 dual mode)")
217233
else()
218234
message(STATUS " JPEG 8/12 bit dual mode: Requested:${jpeg12} Availability:${JPEG12_FOUND} Support:${JPEG_DUAL_MODE_8_12}")
219235
endif()
@@ -227,6 +243,8 @@ message(STATUS " LZMA2 support: Requested:${lzma} Availabi
227243
message(STATUS " ZSTD support: Requested:${zstd} Availability:${ZSTD_USABLE} Support:${ZSTD_SUPPORT}")
228244
message(STATUS " WEBP support: Requested:${webp} Availability:${WebP_FOUND} Support:${WEBP_SUPPORT}")
229245
message(STATUS "")
230-
message(STATUS " C++ support: ${cxx} (requested) ${CXX_SUPPORT} (availability)")
246+
message(STATUS " C++ support: ${tiff-cxx} (requested) ${CXX_SUPPORT} (availability)")
247+
message(STATUS "")
231248
# message(STATUS " X Athena Widgets support: ${HAVE_XAW}")
249+
message(STATUS " OpenGL support: Requested:${tiff-opengl} Availability:${HAVE_OPENGL} Support:${OPENGL_SUPPORT}")
232250
message(STATUS "")

0 commit comments

Comments
 (0)