diff --git a/libs/tiff-4.0.3/CMakeLists.txt b/libs/tiff-4.0.3/CMakeLists.txt index 33424428..de9899b6 100644 --- a/libs/tiff-4.0.3/CMakeLists.txt +++ b/libs/tiff-4.0.3/CMakeLists.txt @@ -43,16 +43,141 @@ set(TIFF_SRC libtiff/tif_tile.c libtiff/tif_version.c libtiff/tif_warning.c - libtiff/tif_win32.c libtiff/tif_write.c libtiff/tif_zip.c ) if(MSVC) + set(TIFF_SRC ${TIFF_SRC} libtiff/tif_win32.c) + add_definitions (-DUSE_WIN32_FILEIO) file(COPY libtiff/tif_config.vc.h DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/tif_config.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h) file(COPY libtiff/tiffconf.vc.h DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(RENAME ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.vc.h ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h) +elseif(APPLE) + include(CheckFunctionExists) + include(CheckIncludeFiles) + include(CheckLibraryExists) + include(CheckSymbolExists) + include(CheckTypeSize) + + set(CCITT_SUPPORT 1) + set(CHECK_JPEG_YCBCR_SUBSAMPLING 1) + set(CXX_SUPPORT 1) + set(DEFAULT_EXTRASAMPLE_AS_ALPHA 1) + + check_include_files(assert.h HAVE_ASSERT_H) + check_include_files(dlfcn.h HAVE_DLFCN_H) + check_include_files(fcntl.h HAVE_FCNTL_H) + check_function_exists(floor HAVE_FLOOR) + check_function_exists(getopt HAVE_GETOPT) + + set(HAVE_IEEEFP 1) + + check_include_files(inttypes.h HAVE_INTTYPES_H) + check_include_files(isascii HAVE_ISASCII) + check_function_exists(lfind HAVE_LFIND) + + check_library_exists(c "" "" HAVE_LIBC) + check_library_exists(m "" "" HAVE_LIBM) + + check_include_files(limits.h HAVE_LIMITS_H) + check_include_files(malloc.h HAVE_MALLOC_H) + check_function_exists(memmove HAVE_MEMMOVE) + + check_include_files(memory.h HAVE_MEMORY_H) + + check_function_exists(memset HAVE_MEMSET) + check_function_exists(mmap HAVE_MMAP) + check_function_exists(pow HAVE_POW) + + # Define if you have POSIX threads libraries and header files. + #undef HAVE_PTHREAD + + check_include_files(search.h HAVE_SEARCH_H) + check_function_exists(sqrt HAVE_SQRT) + check_include_files(stdint.h HAVE_STDINT_H) + check_include_files(stdlib.h HAVE_STDLIB_H) + check_function_exists(strcasecmp HAVE_STRCASECMP) + check_function_exists(strchr HAVE_STRCHR) + check_include_files(strings.h HAVE_STRINGS_H) + check_include_files(string.h HAVE_STRING_H) + check_function_exists(strrchr HAVE_STRRCHR) + check_function_exists(strstr HAVE_STRSTR) + check_function_exists(strtol HAVE_STRTOL) + check_function_exists(strtoul HAVE_STRTOUL) + check_include_files("sys/stat.h" HAVE_SYS_STAT_H) + check_include_files("sys/time.h" HAVE_SYS_TIME_H) + check_include_files("sys/types.h" HAVE_SYS_TYPES_H) + check_include_files(unistd.h HAVE_UNISTD_H) + check_include_files(windows.h HAVE_WINDOWS_H) + + # Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian + # (Intel) + set(HOST_BIGENDIAN 0) + + # Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) + set(HOST_FILLORDER "FILLORDER_LSB2MSB") + set(LOGLUV_SUPPORT 1) + + set(LZW_SUPPORT 1) + set(MDI_SUPPORT 1) + set(NEXT_SUPPORT 1) + + # Define to 1 if your C compiler doesn't accept -c and -o together. + #undef NO_MINUS_C_MINUS_O + + # Support Old JPEG compresson (read contrib/ojpeg/README first! + # Compilation fails with unpatched IJG JPEG library) + #undef OJPEG_SUPPORT + + set(PACKAGE "tiff") + set(PACKAGE_BUGREPORT "") + set(PACKAGE_NAME "LibTIFF Software") + set(PACKAGE_STRING "LibTIFF Software 4.0.3") + set(PACKAGE_TARNAME "tiff") + set(PACKAGE_VERSION "4.0.3") + set(PACKBITS_SUPPORT 1) + set(PIXARLOG_SUPPORT 1) + + #Define to necessary symbol if this constant uses a non-standard name onyour system. + #undef PTHREAD_CREATE_JOINABLE + + check_type_size("int" SIZEOF_INT) + check_type_size("long" SIZEOF_LONG) + + set(STDC_HEADERS 1) + set(STRIPCHOP_DEFAULT "TIFF_STRIPCHOP") + set(STRIP_SIZE_DEFAULT 8192) + set(SUBIFD_SUPPORT 1) + set(THUNDER_SUPPORT 1) + set(TIME_WITH_SYS_TIME 1) + + check_symbol_exists("struct tm" "sys/time.h" TM_IN_SYS_TIME) + set(VERSION "4.0.3") + + # Define to 1 if your processor stores words with the most significant byte first + # (like Motorola and SPARC, unlike Intel and VAX). + #undef WORDS_BIGENDIAN + + set(X_DISPLAY_MISSING 1) + set(ZIP_SUPPORT 1) + # Number of bits in a file offset, on hosts where this is settable. + #undef _FILE_OFFSET_BITS + + # Define for large files, on AIX-style hosts. + #undef _LARGE_FILES + + # Define to empty if `const' does not conform to ANSI C. + set(const const) + + configure_file(libtiff/tif_config.h.cmake tif_config.h) + configure_file(libtiff/tiffconf.h.cmake tiffconf.h) + add_definitions(-DHAVE_CONFIG_H) +endif() + +if(UNIX) + set(TIFF_SRC ${TIFF_SRC} libtiff/tif_unix.c) endif() if (TIFF_BUILD_STATIC) diff --git a/libs/tiff-4.0.3/libtiff/tif_config.h.cmake b/libs/tiff-4.0.3/libtiff/tif_config.h.cmake new file mode 100644 index 00000000..6251f6c9 --- /dev/null +++ b/libs/tiff-4.0.3/libtiff/tif_config.h.cmake @@ -0,0 +1,263 @@ +/* libtiff/tif_config.h. Generated by configure. */ +/* libtiff/tif_config.h.in. Generated from configure.ac by autoheader. */ + +/* Support CCITT Group 3 & 4 algorithms */ +#cmakedefine CCITT_SUPPORT + +/* Pick up YCbCr subsampling info from the JPEG data stream to support files + lacking the tag (default enabled). */ +#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING + +/* Support C++ stream API (requires C++ compiler) */ +#cmakedefine CXX_SUPPORT + +/* Treat extra sample as alpha (default enabled). 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. */ +#cmakedefine DEFAULT_EXTRASAMPLE_AS_ALPHA + +/* Use the Apple OpenGL framework. */ +#cmakedefine01 HAVE_APPLE_OPENGL_FRAMEWORK + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_ASSERT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_FCNTL_H + +/* Define to 1 if you have the `floor' function. */ +#cmakedefine HAVE_FLOOR + +/* Define to 1 if you have the `getopt' function. */ +#cmakedefine HAVE_GETOPT + +/* Define as 0 or 1 according to the floating point format suported by the + machine */ +#cmakedefine HAVE_IEEEFP + +/* Define to 1 if the system has the type `int16'. */ +#cmakedefine HAVE_INT16 + +/* Define to 1 if the system has the type `int32'. */ +#cmakedefine HAVE_INT32 + +/* Define to 1 if the system has the type `int8'. */ +#cmakedefine HAVE_INT8 + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_INTTYPES_H + +/* Define to 1 if you have the `isascii' function. */ +#cmakedefine HAVE_ISASCII + +/* Define to 1 if you have the `lfind' function. */ +#cmakedefine HAVE_LFIND + +/* Define to 1 if you have the `c' library (-lc). */ +#cmakedefine HAVE_LIBC + +/* Define to 1 if you have the `m' library (-lm). */ +#cmakedefine HAVE_LIBM + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_LIMITS_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MALLOC_H + +/* Define to 1 if you have the `memmove' function. */ +#cmakedefine HAVE_MEMMOVE + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#cmakedefine HAVE_MEMSET + +/* Define to 1 if you have the `mmap' function. */ +#cmakedefine HAVE_MMAP + +/* Define to 1 if you have the `pow' function. */ +#cmakedefine HAVE_POW + +/* Define if you have POSIX threads libraries and header files. */ +#cmakedefine HAVE_PTHREAD + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SEARCH_H + +/* Define to 1 if you have the `sqrt' function. */ +#cmakedefine HAVE_SQRT + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#cmakedefine HAVE_STRCASECMP + +/* Define to 1 if you have the `strchr' function. */ +#cmakedefine HAVE_STRCHR + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_STRING_H + +/* Define to 1 if you have the `strrchr' function. */ +#cmakedefine HAVE_STRRCHR + +/* Define to 1 if you have the `strstr' function. */ +#cmakedefine HAVE_STRSTR + +/* Define to 1 if you have the `strtol' function. */ +#cmakedefine HAVE_STRTOL + +/* Define to 1 if you have the `strtoul' function. */ +#cmakedefine HAVE_STRTOUL + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_WINDOWS_H + +/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian + (Intel) */ +#define HOST_BIGENDIAN ${HOST_BIGENDIAN} + +/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ +#define HOST_FILLORDER ${HOST_FILLORDER} + +/* Support JPEG compression (requires IJG JPEG library) */ +#cmakedefine JPEG_SUPPORT + +/* Support LogLuv high dynamic range encoding */ +#cmakedefine LOGLUV_SUPPORT + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#cmakedefine LT_OBJDIR 1 + +/* Support LZW algorithm */ +#cmakedefine LZW_SUPPORT + +/* Support Microsoft Document Imaging format */ +#cmakedefine01 MDI_SUPPORT + +/* Support NeXT 2-bit RLE algorithm */ +#cmakedefine NEXT_SUPPORT + +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#cmakedefine NO_MINUS_C_MINUS_O + +/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation + fails with unpatched IJG JPEG library) */ +#cmakedefine OJPEG_SUPPORT + +/* Name of package */ +#define PACKAGE "${PACKAGE}" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "${PACKAGE_BUGREPORT}" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "${PACKAGE_NAME}" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "${PACKAGE_STRING}" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "${PACKAGE_TARNAME}" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "${PACKAGE_VERSION}" + +/* Support Macintosh PackBits algorithm */ +#cmakedefine PACKBITS_SUPPORT + +/* Support Pixar log-format algorithm (requires Zlib) */ +#cmakedefine PIXARLOG_SUPPORT + +/* Define to necessary symbol if this constant uses a non-standard name on + your system. */ +#cmakedefine PTHREAD_CREATE_JOINABLE + +/* The size of a `int', as computed by sizeof. */ +#define SIZEOF_INT @SIZEOF_INT@ + +/* The size of a `long', as computed by sizeof. */ +#define SIZEOF_LONG @SIZEOF_LONG@ + +/* Define to 1 if you have the ANSI C header files. */ +#cmakedefine STDC_HEADERS + +/* Support strip chopping (whether or not to convert single-strip uncompressed + images to mutiple strips of specified size to reduce memory usage) */ +#define STRIPCHOP_DEFAULT @STRIPCHOP_DEFAULT@ + +/* Default size of the strip in bytes (when strip chopping enabled) */ +#define STRIP_SIZE_DEFAULT @STRIP_SIZE_DEFAULT@ + +/* Enable SubIFD tag (330) support */ +#cmakedefine SUBIFD_SUPPORT + +/* Support ThunderScan 4-bit RLE algorithm */ +#cmakedefine THUNDER_SUPPORT + +/* Define to 1 if you can safely include both and . */ +#cmakedefine TIME_WITH_SYS_TIME + +/* Define to 1 if your declares `struct tm'. */ +#cmakedefine TM_IN_SYS_TIME + +/* Version number of package */ +#define VERSION "${VERSION}" + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#cmakedefine WORDS_BIGENDIAN + +/* Define to 1 if the X Window System is missing or not being used. */ +#cmakedefine X_DISPLAY_MISSING + +/* Support Deflate compression */ +#cmakedefine ZIP_SUPPORT + +/* Number of bits in a file offset, on hosts where this is settable. */ +#cmakedefine _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#cmakedefine _LARGE_FILES + +/* Define to empty if `const' does not conform to ANSI C. */ +#cmakedefine const @const@ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +# ifndef inline +# define inline @inline@ +# endif +#endif + +/* Define to `long' if does not define. */ +#cmakedefine off_t + +/* Define to `unsigned' if does not define. */ +#cmakedefine size_t diff --git a/libs/tiff-4.0.3/libtiff/tiffconf.h.cmake b/libs/tiff-4.0.3/libtiff/tiffconf.h.cmake new file mode 100644 index 00000000..19b95bec --- /dev/null +++ b/libs/tiff-4.0.3/libtiff/tiffconf.h.cmake @@ -0,0 +1,144 @@ +/* + Configuration defines for installed libtiff. + This file maintained for backward compatibility. Do not use definitions + from this file in your programs. +*/ + +#ifndef _TIFFCONF_ +#define _TIFFCONF_ + +/* Define to 1 if the system has the type `int16'. */ +#cmakedefine HAVE_INT16 + +/* Define to 1 if the system has the type `int32'. */ +#cmakedefine HAVE_INT32 + +/* Define to 1 if the system has the type `int8'. */ +#cmakedefine HAVE_INT8 + +/* The size of a `int', as computed by sizeof. */ +#define SIZEOF_INT @SIZEOF_INT@ + +/* The size of a `long', as computed by sizeof. */ +#define SIZEOF_LONG @SIZEOF_LONG@ + +/* Signed 8-bit type */ +#define TIFF_INT8_T char + +/* Unsigned 8-bit type */ +#define TIFF_UINT8_T unsigned char + +/* Signed 16-bit type */ +#define TIFF_INT16_T signed __INT16_TYPE__ + +/* Unsigned 16-bit type */ +#define TIFF_UINT16_T unsigned __INT16_TYPE__ + +/* Signed 32-bit type formatter */ +#define TIFF_INT32_FORMAT "%d" + +/* Signed 32-bit type */ +#define TIFF_INT32_T signed __INT32_TYPE__ + +/* Unsigned 32-bit type formatter */ +#define TIFF_UINT32_FORMAT "%u" + +/* Unsigned 32-bit type */ +#define TIFF_UINT32_T unsigned __INT32_TYPE__ + +/* Signed 64-bit type formatter */ +#define TIFF_INT64_FORMAT "%ld" + +/* Signed 64-bit type */ +#define TIFF_INT64_T signed __INT64_TYPE__ + +/* Unsigned 64-bit type formatter */ +#define TIFF_UINT64_FORMAT "%llu" + +/* Unsigned 64-bit type */ +#define TIFF_UINT64_T unsigned __INT64_TYPE__ + +/* Signed size type */ +#define TIFF_SSIZE_T signed __INT64_TYPE__ + +#define TIFF_SSIZE_FORMAT "%llu" + +/* Pointer difference type */ +#define TIFF_PTRDIFF_T long + +/* Compatibility stuff. */ + +/* Define as 0 or 1 according to the floating point format suported by the + machine */ +#cmakedefine HAVE_IEEEFP + +/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */ +#cmakedefine HOST_FILLORDER FILLORDER_LSB2MSB + +/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian + (Intel) */ +#cmakedefine HOST_BIGENDIAN 0 + +/* Support CCITT Group 3 & 4 algorithms */ +#cmakedefine CCITT_SUPPORT + +/* Support JPEG compression (requires IJG JPEG library) */ +#cmakedefine JPEG_SUPPORT + +/* Support LogLuv high dynamic range encoding */ +#cmakedefine LOGLUV_SUPPORT + +/* Support LZW algorithm */ +#cmakedefine LZW_SUPPORT + +/* Support NeXT 2-bit RLE algorithm */ +#cmakedefine NEXT_SUPPORT + +/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation + fails with unpatched IJG JPEG library) */ +#cmakedefine OJPEG_SUPPORT + +/* Support Macintosh PackBits algorithm */ +#cmakedefine PACKBITS_SUPPORT + +/* Support Pixar log-format algorithm (requires Zlib) */ +#cmakedefine PIXARLOG_SUPPORT + +/* Support ThunderScan 4-bit RLE algorithm */ +#cmakedefine THUNDER_SUPPORT + +/* Support Deflate compression */ +#cmakedefine ZIP_SUPPORT + +/* Support strip chopping (whether or not to convert single-strip uncompressed + images to mutiple strips of ~8Kb to reduce memory usage) */ +#define STRIPCHOP_DEFAULT @STRIPCHOP_DEFAULT@ + +/* Enable SubIFD tag (330) support */ +#cmakedefine SUBIFD_SUPPORT + +/* Treat extra sample as alpha (default enabled). 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. */ +#cmakedefine DEFAULT_EXTRASAMPLE_AS_ALPHA + +/* Pick up YCbCr subsampling info from the JPEG data stream to support files + lacking the tag (default enabled). */ +#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING + +/* Support MS MDI magic number files as TIFF */ +#cmakedefine01 MDI_SUPPORT + +/* + * Feature support definitions. + * XXX: These macros are obsoleted. Don't use them in your apps! + * Macros stays here for backward compatibility and should be always defined. + */ +#define COLORIMETRY_SUPPORT +#define YCBCR_SUPPORT +#define CMYK_SUPPORT +#define ICC_SUPPORT +#define PHOTOSHOP_SUPPORT +#define IPTC_SUPPORT + +#endif /* _TIFFCONF_ */