mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 19:59:05 +08:00
40ad15cac1
* Format manifest * Update to 4.3.0 * Revise features and dependencies * Fix pc files * Quote filepath expressions * Switch to port vcpkg-cmake * Use features for vcpkg-cmake-wrapper * [selene] Don't warn/fail on using deprecated types from tiff * x-add-version * Use proper 'version' field * [selene] Format manifest * [selene] Modernize build file * Overwrite version and git-tree * Rebuild * Implement review comment * Overwrite git-tree * Rename cmake wrapper template * Overwrite git-tree
50 lines
1.5 KiB
CMake
50 lines
1.5 KiB
CMake
_find_package(${ARGS})
|
|
|
|
set(_tiff_features ";@FEATURES@;")
|
|
set(_tiff_link_libraries "")
|
|
set(_tiff_libraries "")
|
|
if(_tiff_features MATCHES ";webp;")
|
|
find_package(WebP CONFIG REQUIRED)
|
|
list(APPEND _tiff_link_libraries WebP::WebP)
|
|
list(APPEND _tiff_libraries ${WEBP_LIBRARIES})
|
|
endif()
|
|
if(_tiff_features MATCHES ";lzma;")
|
|
find_package(LibLZMA CONFIG REQUIRED)
|
|
list(APPEND _tiff_link_libraries LibLZMA::LibLZMA)
|
|
list(APPEND _tiff_libraries ${LZMA_LIBRARIES})
|
|
endif()
|
|
if(_tiff_features MATCHES ";jpeg;")
|
|
find_package(JPEG REQUIRED)
|
|
list(APPEND _tiff_link_libraries JPEG::JPEG)
|
|
list(APPEND _tiff_libraries ${JPEG_LIBRARIES})
|
|
endif()
|
|
if(_tiff_features MATCHES ";zstd;")
|
|
find_package(ZSTD CONFIG REQUIRED)
|
|
if(TARGET zstd::libzstd_shared)
|
|
set(_tiff_zstd zstd::libzstd_shared)
|
|
else()
|
|
set(_tiff_zstd zstd::libzstd_static)
|
|
endif()
|
|
list(APPEND _tiff_link_libraries ${_tiff_zstd})
|
|
list(APPEND _tiff_libraries ${_tiff_zstd})
|
|
endif()
|
|
if(_tiff_features MATCHES ";zip;")
|
|
find_package(ZLIB REQUIRED)
|
|
list(APPEND _tiff_link_libraries ZLIB::ZLIB)
|
|
list(APPEND _tiff_libraries ${ZLIB_LIBRARIES})
|
|
endif()
|
|
if(UNIX)
|
|
list(APPEND _tiff_link_libraries m)
|
|
list(APPEND _tiff_libraries m)
|
|
endif()
|
|
|
|
if(TARGET TIFF::TIFF)
|
|
set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${_tiff_link_libraries})
|
|
endif()
|
|
if(TIFF_LIBRARIES)
|
|
list(APPEND TIFF_LIBRARIES ${_tiff_libraries})
|
|
endif()
|
|
if(TIFF_LIBRARY)
|
|
list(APPEND TIFF_LIBRARY ${_tiff_libraries})
|
|
endif()
|