Debian Codegraph @

texk/xdvipsk/thirdparty/libtiff/cmake/LibraryFeatures.cmake

raw
1 # C library features
2 #
3 # Copyright © 2015 Open Microscopy Environment / University of Dundee
4 # Copyright © 2021 Roger Leigh <[email protected]>
5 # Written by Roger Leigh <[email protected]>
6 #
7 # Permission to use, copy, modify, distribute, and sell this software and
8 # its documentation for any purpose is hereby granted without fee, provided
9 # that (i) the above copyright notices and this permission notice appear in
10 # all copies of the software and related documentation, and (ii) the names of
11 # Sam Leffler and Silicon Graphics may not be used in any advertising or
12 # publicity relating to the software without the specific, prior written
13 # permission of Sam Leffler and Silicon Graphics.
14 #
15 # THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
16 # EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
17 # WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
18 #
19 # IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
20 # ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
21 # OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
22 # WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
23 # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
24 # OF THIS SOFTWARE.
25
26 # Strip chopping
27 option(strip-chopping "strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)" ON)
28 set(TIFF_DEFAULT_STRIP_SIZE 8192 CACHE STRING "default size of the strip in bytes (when strip chopping is enabled)")
29
30 set(STRIPCHOP_DEFAULT)
31 if(strip-chopping)
32 set(STRIPCHOP_DEFAULT TRUE)
33 if(TIFF_DEFAULT_STRIP_SIZE)
34 set(STRIP_SIZE_DEFAULT "${TIFF_DEFAULT_STRIP_SIZE}")
35 endif()
36 endif()
37
38 set(TIFF_MAX_DIR_COUNT 1048576 CACHE STRING "Maximum number of TIFF directories that libtiff can browse through")
39
40 # Defer loading of strip/tile offsets
41 option(defer-strile-load "enable deferred strip/tile offset/size loading (also available at runtime with the 'D' flag of TIFFOpen())" OFF)
42 set(DEFER_STRILE_LOAD ${defer-strile-load})
43
44 # CHUNKY_STRIP_READ_SUPPORT
45 option(chunky-strip-read "enable reading large strips in chunks for TIFFReadScanline() (experimental)" OFF)
46 set(CHUNKY_STRIP_READ_SUPPORT ${chunky-strip-read})
47
48 # SUBIFD support
49 set(SUBIFD_SUPPORT 1)
50
51 # Default handling of ASSOCALPHA support.
52 option(extrasample-as-alpha "the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly" ON)
53 if(extrasample-as-alpha)
54 set(DEFAULT_EXTRASAMPLE_AS_ALPHA 1)
55 endif()
56
57 # Default handling of YCbCr subsampling support.
58 # See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details.
59 option(check-ycbcr-subsampling "enable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag" ON)
60 if (check-ycbcr-subsampling)
61 set(CHECK_JPEG_YCBCR_SUBSAMPLING 1)
62 endif()