CMakeLists.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. # ----------------------------------------------------------------------------
  2. # CMake file for libtiff. See root CMakeLists.txt
  3. #
  4. # ----------------------------------------------------------------------------
  5. project(${TIFF_LIBRARY})
  6. include(CheckCSourceCompiles)
  7. include(CheckFunctionExists)
  8. include(CheckIncludeFile)
  9. include(CheckTypeSize)
  10. # Find libm, if available
  11. find_library(M_LIBRARY m)
  12. check_include_file(assert.h HAVE_ASSERT_H)
  13. if(NOT MSVC)
  14. check_include_file(dlfcn.h HAVE_DLFCN_H)
  15. endif()
  16. check_include_file(fcntl.h HAVE_FCNTL_H)
  17. check_include_file(inttypes.h HAVE_INTTYPES_H)
  18. check_include_file(io.h HAVE_IO_H)
  19. check_include_file(limits.h HAVE_LIMITS_H)
  20. check_include_file(malloc.h HAVE_MALLOC_H)
  21. check_include_file(memory.h HAVE_MEMORY_H)
  22. check_include_file(search.h HAVE_SEARCH_H)
  23. check_include_file(stdint.h HAVE_STDINT_H)
  24. check_include_file(string.h HAVE_STRING_H)
  25. if(NOT MSVC)
  26. check_include_file(strings.h HAVE_STRINGS_H)
  27. check_include_file(sys/time.h HAVE_SYS_TIME_H)
  28. endif()
  29. check_include_file(sys/types.h HAVE_SYS_TYPES_H)
  30. if(NOT MSVC)
  31. check_include_file(unistd.h HAVE_UNISTD_H)
  32. endif()
  33. # Inspired from /usr/share/autoconf/autoconf/c.m4
  34. foreach(inline_keyword "inline" "__inline__" "__inline")
  35. if(NOT DEFINED C_INLINE)
  36. set(CMAKE_REQUIRED_DEFINITIONS_SAVE ${CMAKE_REQUIRED_DEFINITIONS})
  37. set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
  38. "-Dinline=${inline_keyword}")
  39. check_c_source_compiles("
  40. typedef int foo_t;
  41. static inline foo_t static_foo() {return 0;}
  42. foo_t foo(){return 0;}
  43. int main(int argc, char *argv[]) {return 0;}"
  44. C_HAS_${inline_keyword})
  45. set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS_SAVE})
  46. if(C_HAS_${inline_keyword})
  47. set(C_INLINE TRUE)
  48. set(INLINE_KEYWORD "${inline_keyword}")
  49. endif()
  50. endif()
  51. endforeach()
  52. if(NOT DEFINED C_INLINE)
  53. set(INLINE_KEYWORD)
  54. endif()
  55. # Check type sizes
  56. # NOTE: Could be replaced with C99 <stdint.h>
  57. check_type_size("signed short" SIZEOF_SIGNED_SHORT)
  58. check_type_size("unsigned short" SIZEOF_UNSIGNED_SHORT)
  59. check_type_size("signed int" SIZEOF_SIGNED_INT)
  60. check_type_size("unsigned int" SIZEOF_UNSIGNED_INT)
  61. check_type_size("signed long" SIZEOF_SIGNED_LONG)
  62. check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
  63. check_type_size("signed long long" SIZEOF_SIGNED_LONG_LONG)
  64. check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
  65. check_type_size("unsigned char *" SIZEOF_UNSIGNED_CHAR_P)
  66. set(CMAKE_EXTRA_INCLUDE_FILES_SAVE ${CMAKE_EXTRA_INCLUDE_FILES})
  67. set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "stddef.h")
  68. check_type_size("size_t" SIZEOF_SIZE_T)
  69. check_type_size("ptrdiff_t" SIZEOF_PTRDIFF_T)
  70. set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES_SAVE})
  71. set(TIFF_INT8_T "signed char")
  72. set(TIFF_UINT8_T "unsigned char")
  73. set(TIFF_INT16_T "signed short")
  74. set(TIFF_UINT16_T "unsigned short")
  75. if(SIZEOF_SIGNED_INT EQUAL 4)
  76. set(TIFF_INT32_T "signed int")
  77. set(TIFF_INT32_FORMAT "%d")
  78. elseif(SIZEOF_SIGNED_LONG EQUAL 4)
  79. set(TIFF_INT32_T "signed long")
  80. set(TIFF_INT32_FORMAT "%ld")
  81. endif()
  82. if(SIZEOF_UNSIGNED_INT EQUAL 4)
  83. set(TIFF_UINT32_T "unsigned int")
  84. set(TIFF_UINT32_FORMAT "%u")
  85. elseif(SIZEOF_UNSIGNED_LONG EQUAL 4)
  86. set(TIFF_UINT32_T "unsigned long")
  87. set(TIFF_UINT32_FORMAT "%lu")
  88. endif()
  89. if(SIZEOF_SIGNED_LONG EQUAL 8)
  90. set(TIFF_INT64_T "signed long")
  91. set(TIFF_INT64_FORMAT "%ld")
  92. elseif(SIZEOF_SIGNED_LONG_LONG EQUAL 8)
  93. set(TIFF_INT64_T "signed long long")
  94. if(MINGW)
  95. set(TIFF_INT64_FORMAT "%I64d")
  96. else()
  97. set(TIFF_INT64_FORMAT "%lld")
  98. endif()
  99. endif()
  100. if(SIZEOF_UNSIGNED_LONG EQUAL 8)
  101. set(TIFF_UINT64_T "unsigned long")
  102. set(TIFF_UINT64_FORMAT "%lu")
  103. elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL 8)
  104. set(TIFF_UINT64_T "unsigned long long")
  105. if(MINGW)
  106. set(TIFF_UINT64_FORMAT "%I64u")
  107. else()
  108. set(TIFF_UINT64_FORMAT "%llu")
  109. endif()
  110. endif()
  111. if(SIZEOF_UNSIGNED_INT EQUAL SIZEOF_SIZE_T)
  112. set(TIFF_SIZE_T "unsigned int")
  113. set(TIFF_SIZE_FORMAT "%u")
  114. set(TIFF_SSIZE_T "signed int")
  115. set(TIFF_SSIZE_FORMAT "%d")
  116. elseif(SIZEOF_UNSIGNED_LONG EQUAL SIZEOF_SIZE_T)
  117. set(TIFF_SIZE_T "unsigned long")
  118. set(TIFF_SIZE_FORMAT "%lu")
  119. set(TIFF_SSIZE_T "signed long")
  120. set(TIFF_SSIZE_FORMAT "%ld")
  121. elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL SIZEOF_SIZE_T)
  122. set(TIFF_SIZE_T "unsigned long")
  123. if(MINGW)
  124. set(TIFF_SIZE_FORMAT "%I64u")
  125. set(TIFF_SSIZE_FORMAT "%I64d")
  126. else()
  127. set(TIFF_SIZE_FORMAT "%llu")
  128. set(TIFF_SSIZE_FORMAT "%lld")
  129. endif()
  130. endif()
  131. if(SIZEOF_SIGNED_INT EQUAL SIZEOF_UNSIGNED_CHAR_P)
  132. elseif(SIZEOF_SIGNED_LONG EQUAL SIZEOF_UNSIGNED_CHAR_P)
  133. elseif(SIZEOF_SIGNED_LONG_LONG EQUAL SIZEOF_UNSIGNED_CHAR_P)
  134. set(TIFF_SSIZE_T "signed long long")
  135. if(MINGW)
  136. else()
  137. endif()
  138. endif()
  139. if(NOT SIZEOF_PTRDIFF_T)
  140. set(TIFF_PTRDIFF_T "${TIFF_SSIZE_T}")
  141. set(TIFF_PTRDIFF_FORMAT "${SSIZE_FORMAT}")
  142. else()
  143. set(TIFF_PTRDIFF_T "ptrdiff_t")
  144. set(TIFF_PTRDIFF_FORMAT "%ld")
  145. endif()
  146. # Nonstandard int types
  147. if(NOT MSVC)
  148. check_type_size(INT8 int8)
  149. set(HAVE_INT8 ${INT8})
  150. check_type_size(INT16 int16)
  151. set(HAVE_INT16 ${INT16})
  152. check_type_size(INT32 int32)
  153. set(HAVE_INT32 ${INT32})
  154. endif()
  155. # Check functions
  156. if(NOT MSVC)
  157. set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
  158. set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${M_LIBRARY})
  159. check_function_exists(floor HAVE_FLOOR)
  160. check_function_exists(pow HAVE_POW)
  161. check_function_exists(sqrt HAVE_SQRT)
  162. set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
  163. endif()
  164. if(NOT MSVC)
  165. check_function_exists(isascii HAVE_ISASCII)
  166. check_function_exists(memset HAVE_MEMSET)
  167. check_function_exists(mmap HAVE_MMAP)
  168. check_function_exists(getopt HAVE_GETOPT)
  169. endif()
  170. check_function_exists(memmove HAVE_MEMMOVE)
  171. check_function_exists(setmode HAVE_SETMODE)
  172. check_function_exists(strcasecmp HAVE_STRCASECMP)
  173. check_function_exists(strchr HAVE_STRCHR)
  174. check_function_exists(strrchr HAVE_STRRCHR)
  175. check_function_exists(strstr HAVE_STRSTR)
  176. check_function_exists(strtol HAVE_STRTOL)
  177. check_function_exists(strtol HAVE_STRTOUL)
  178. check_function_exists(strtoull HAVE_STRTOULL)
  179. check_function_exists(lfind HAVE_LFIND)
  180. # May be inlined, so check it compiles:
  181. check_c_source_compiles("
  182. #include <stdio.h>
  183. int main(void) {
  184. char buf[10];
  185. snprintf(buf, 10, \"Test %d\", 1);
  186. return 0;
  187. }"
  188. HAVE_SNPRINTF)
  189. if(NOT HAVE_SNPRINTF)
  190. add_definitions(-DNEED_LIBPORT)
  191. endif()
  192. # CPU bit order
  193. set(fillorder FILLORDER_MSB2LSB)
  194. if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i.*86.*" OR
  195. CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*" OR
  196. # AMD64 on Windows
  197. CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "AMD64" OR
  198. CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64.*")
  199. set(fillorder FILLORDER_LSB2MSB)
  200. endif()
  201. set(HOST_FILLORDER ${fillorder} CACHE STRING "Native CPU bit order")
  202. mark_as_advanced(HOST_FILLORDER)
  203. # CPU endianness
  204. include(TestBigEndian)
  205. test_big_endian(bigendian)
  206. if(bigendian)
  207. set(bigendian ON)
  208. else()
  209. set(bigendian OFF)
  210. endif()
  211. set(HOST_BIG_ENDIAN ${bigendian} CACHE STRING "Native CPU bit order")
  212. mark_as_advanced(HOST_BIG_ENDIAN)
  213. if(HOST_BIG_ENDIAN)
  214. set(HOST_BIG_ENDIAN 1)
  215. else()
  216. set(HOST_BIG_ENDIAN 0)
  217. endif()
  218. if(HOST_BIG_ENDIAN)
  219. add_definitions(-DWORDS_BIGENDIAN)
  220. endif()
  221. # IEEE floating point
  222. set(HAVE_IEEEFP 1 CACHE STRING "IEEE floating point is available")
  223. mark_as_advanced(HAVE_IEEEFP)
  224. # Large file support
  225. if(UNIX OR MINGW)
  226. if(ANDROID AND (ANDROID_NATIVE_API_LEVEL LESS 21) AND CV_GCC)
  227. # Android NDK build problem: 'mmap' issue with GCC and API<21
  228. else()
  229. # This might not catch every possibility catered for by
  230. # AC_SYS_LARGEFILE.
  231. add_definitions(-D_FILE_OFFSET_BITS=64)
  232. set(FILE_OFFSET_BITS 64)
  233. endif()
  234. endif()
  235. # Documentation install directory (default to cmake project docdir)
  236. set(LIBTIFF_DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}")
  237. # Options to enable and disable internal codecs
  238. option(ccitt "support for CCITT Group 3 & 4 algorithms" ON)
  239. set(CCITT_SUPPORT ${ccitt})
  240. option(packbits "support for Macintosh PackBits algorithm" ON)
  241. set(PACKBITS_SUPPORT ${packbits})
  242. option(lzw "support for LZW algorithm" ON)
  243. set(LZW_SUPPORT ${lzw})
  244. option(thunder "support for ThunderScan 4-bit RLE algorithm" ON)
  245. set(THUNDER_SUPPORT ${thunder})
  246. option(next "support for NeXT 2-bit RLE algorithm" ON)
  247. set(NEXT_SUPPORT ${next})
  248. option(logluv "support for LogLuv high dynamic range algorithm" ON)
  249. set(LOGLUV_SUPPORT ${logluv})
  250. # Option for Microsoft Document Imaging
  251. option(mdi "support for Microsoft Document Imaging" ON)
  252. set(MDI_SUPPORT ${mdi})
  253. # ZLIB
  254. set(ZLIB_SUPPORT 0)
  255. if(ZLIB_LIBRARY)
  256. set(ZLIB_SUPPORT 1)
  257. endif()
  258. set(ZIP_SUPPORT ${ZLIB_SUPPORT})
  259. set(PIXARLOG_SUPPORT FALSE)
  260. # JPEG
  261. set(JPEG_SUPPORT FALSE)
  262. if(HAVE_JPEG)
  263. set(JPEG_SUPPORT TRUE)
  264. if(TARGET ${JPEG_LIBRARY} AND DEFINED ${JPEG_LIBRARY}_BINARY_DIR)
  265. include_directories("${${JPEG_LIBRARY}_BINARY_DIR}")
  266. endif()
  267. include_directories(${JPEG_INCLUDE_DIR})
  268. endif()
  269. option(old-jpeg "support for Old JPEG compression (read-only)" OFF) # OpenCV: changed to OFF
  270. set(OJPEG_SUPPORT FALSE)
  271. if(JPEG_SUPPORT AND old-jpeg)
  272. set(OJPEG_SUPPORT TRUE)
  273. endif()
  274. # OpenCV: turned off
  275. set(JBIG_SUPPORT 0)
  276. set(LZMA_SUPPORT 0) # OpenCV: turned off
  277. set(JPEG12_FOUND FALSE) # OpenCV: turned off
  278. set(STRIPCHOP_DEFAULT)
  279. set(STRIP_SIZE_DEFAULT 8192)
  280. # Win32 IO
  281. set(win32_io FALSE)
  282. if(WIN32 AND NOT WINRT)
  283. set(win32_io TRUE)
  284. endif()
  285. set(USE_WIN32_FILEIO ${win32_io} CACHE BOOL "Use win32 IO system (Microsoft Windows only)")
  286. if(USE_WIN32_FILEIO)
  287. set(USE_WIN32_FILEIO TRUE)
  288. else()
  289. set(USE_WIN32_FILEIO FALSE)
  290. endif()
  291. # Orthogonal features
  292. # OpenCV: turned ON
  293. set(SUBIFD_SUPPORT 1)
  294. set(DEFAULT_EXTRASAMPLE_AS_ALPHA 1)
  295. set(CHECK_JPEG_YCBCR_SUBSAMPLING 1)
  296. if(JPEG_INCLUDE_DIR)
  297. list(APPEND TIFF_INCLUDES ${JPEG_INCLUDE_DIR})
  298. endif()
  299. if(JPEG12_INCLUDE_DIR)
  300. list(APPEND TIFF_INCLUDES ${JPEG12_INCLUDE_DIR})
  301. endif()
  302. if(JBIG_INCLUDE_DIR)
  303. list(APPEND TIFF_INCLUDES ${JBIG_INCLUDE_DIR})
  304. endif()
  305. if(LIBLZMA_INCLUDE_DIRS)
  306. list(APPEND TIFF_INCLUDES ${LIBLZMA_INCLUDE_DIRS})
  307. endif()
  308. # Libraries required by libtiff
  309. set(TIFF_LIBRARY_DEPS)
  310. if(M_LIBRARY)
  311. list(APPEND TIFF_LIBRARY_DEPS ${M_LIBRARY})
  312. endif()
  313. if(ZLIB_LIBRARIES)
  314. list(APPEND TIFF_LIBRARY_DEPS ${ZLIB_LIBRARIES})
  315. endif()
  316. if(JPEG_LIBRARIES)
  317. list(APPEND TIFF_LIBRARY_DEPS ${JPEG_LIBRARIES})
  318. endif()
  319. if(JPEG12_LIBRARIES)
  320. list(APPEND TIFF_LIBRARY_DEPS ${JPEG12_LIBRARIES})
  321. endif()
  322. if(JBIG_LIBRARIES)
  323. list(APPEND TIFF_LIBRARY_DEPS ${JBIG_LIBRARIES})
  324. endif()
  325. if(LIBLZMA_LIBRARIES)
  326. list(APPEND TIFF_LIBRARY_DEPS ${LIBLZMA_LIBRARIES})
  327. endif()
  328. configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmake.in"
  329. "${CMAKE_CURRENT_BINARY_DIR}/tif_config.h"
  330. @ONLY)
  331. configure_file("${CMAKE_CURRENT_SOURCE_DIR}/tiffconf.h.cmake.in"
  332. "${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h"
  333. @ONLY)
  334. ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" ${ZLIB_INCLUDE_DIRS})
  335. set(lib_srcs
  336. tif_aux.c
  337. tif_close.c
  338. tif_codec.c
  339. tif_color.c
  340. tif_compress.c
  341. tif_dir.c
  342. tif_dirinfo.c
  343. tif_dirread.c
  344. tif_dirwrite.c
  345. tif_dumpmode.c
  346. tif_error.c
  347. tif_extension.c
  348. tif_fax3.c
  349. tif_fax3sm.c
  350. tif_flush.c
  351. tif_getimage.c
  352. tif_jbig.c
  353. tif_jpeg_12.c
  354. tif_jpeg.c
  355. tif_luv.c
  356. tif_lzma.c
  357. tif_lzw.c
  358. tif_next.c
  359. tif_ojpeg.c
  360. tif_open.c
  361. tif_packbits.c
  362. tif_pixarlog.c
  363. tif_predict.c
  364. tif_print.c
  365. tif_read.c
  366. tif_strip.c
  367. tif_swab.c
  368. tif_thunder.c
  369. tif_tile.c
  370. tif_version.c
  371. tif_warning.c
  372. tif_webp.c
  373. tif_write.c
  374. tif_zip.c
  375. tif_zstd.c
  376. tif_stream.cxx
  377. t4.h
  378. tif_dir.h
  379. tif_fax3.h
  380. tiff.h
  381. tiffio.h
  382. tiffiop.h
  383. tiffvers.h
  384. tif_predict.h
  385. uvcode.h
  386. tiffio.hxx
  387. "${CMAKE_CURRENT_BINARY_DIR}/tif_config.h"
  388. "${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h"
  389. )
  390. if(WIN32 AND NOT HAVE_SNPRINTF)
  391. list(APPEND lib_srcs snprintf.c libport.h)
  392. endif()
  393. if(WIN32 AND NOT WINRT)
  394. list(APPEND lib_srcs tif_win32.c)
  395. else()
  396. list(APPEND lib_srcs tif_unix.c)
  397. endif()
  398. ocv_warnings_disable(CMAKE_C_FLAGS -Wno-unused-but-set-variable -Wmissing-prototypes -Wmissing-declarations -Wundef -Wunused -Wsign-compare
  399. -Wcast-align -Wshadow -Wno-maybe-uninitialized -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast
  400. -Wmisleading-indentation
  401. -Wimplicit-fallthrough
  402. )
  403. ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter) # clang
  404. ocv_warnings_disable(CMAKE_CXX_FLAGS -Wmissing-declarations -Wunused-parameter -Wmissing-prototypes
  405. -Wundef # tiffiop.h: #if __clang_major__ >= 4
  406. )
  407. ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4018 /wd4100 /wd4127 /wd4311 /wd4701 /wd4706) # vs2005
  408. ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4244) # vs2008
  409. ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4267 /wd4305 /wd4306) # vs2008 Win64
  410. ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4703) # vs2012
  411. ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4456 /wd4457 /wd4312) # vs2015
  412. ocv_warnings_disable(CMAKE_C_FLAGS /wd4267 /wd4244 /wd4018 /wd4311 /wd4312)
  413. add_library(${TIFF_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${lib_srcs})
  414. target_link_libraries(${TIFF_LIBRARY} ${ZLIB_LIBRARIES})
  415. set_target_properties(${TIFF_LIBRARY}
  416. PROPERTIES
  417. OUTPUT_NAME "${TIFF_LIBRARY}"
  418. DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
  419. COMPILE_PDB_NAME ${TIFF_LIBRARY}
  420. COMPILE_PDB_NAME_DEBUG "${TIFF_LIBRARY}${OPENCV_DEBUG_POSTFIX}"
  421. ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
  422. )
  423. if(ENABLE_SOLUTION_FOLDERS)
  424. set_target_properties(${TIFF_LIBRARY} PROPERTIES FOLDER "3rdparty")
  425. endif()
  426. if(NOT BUILD_SHARED_LIBS)
  427. ocv_install_target(${TIFF_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev OPTIONAL)
  428. endif()
  429. ocv_install_3rdparty_licenses(libtiff COPYRIGHT)