vcpkg/ports/tiff/portfile.cmake

94 lines
2.4 KiB
CMake
Raw Normal View History

vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.com
OUT_SOURCE_PATH SOURCE_PATH
REPO libtiff/libtiff
REF "v${VERSION}"
SHA512 5227cb7b496ac6829601d8d689233bd8f318c1d04e5ce3457cdd6eac9e4f8c80cd7211d90cd092c61ad38bc8a4949169a13eabd788c46c15bcee1f72519fa022
HEAD_REF master
PATCHES
FindCMath.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
cxx cxx
jpeg jpeg
jpeg CMAKE_REQUIRE_FIND_PACKAGE_JPEG
lzma lzma
lzma CMAKE_REQUIRE_FIND_PACKAGE_LibLZMA
tools tiff-tools
webp webp
webp CMAKE_REQUIRE_FIND_PACKAGE_WebP
zip zlib
zip CMAKE_REQUIRE_FIND_PACKAGE_ZLIB
zstd zstd
zstd CMAKE_REQUIRE_FIND_PACKAGE_ZSTD
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-Dtiff-docs=OFF
-Dtiff-contrib=OFF
-Dtiff-tests=OFF
-Dlibdeflate=OFF
-Djbig=OFF # This is disabled by default due to GPL/Proprietary licensing.
-Djpeg12=OFF
-Dlerc=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_OpenGL=ON
-DCMAKE_DISABLE_FIND_PACKAGE_GLUT=ON
-DZSTD_HAVE_DECOMPRESS_STREAM=ON
OPTIONS_DEBUG
-DCMAKE_DEBUG_POSTFIX=d # tiff sets "d" for MSVC only.
MAYBE_UNUSED_VARIABLES
ZSTD_HAVE_DECOMPRESS_STREAM
2016-09-19 11:50:08 +08:00
)
vcpkg_cmake_install()
2022-06-01 06:13:56 +08:00
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}")
set(_file "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libtiff-4.pc")
if(EXISTS "${_file}")
vcpkg_replace_string("${_file}" "-ltiff" "-ltiffd")
endif()
vcpkg_fixup_pkgconfig()
2016-09-19 11:50:08 +08:00
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/share"
2016-09-19 11:50:08 +08:00
)
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake.in" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
if ("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES
fax2ps
fax2tiff
pal2rgb
ppm2tiff
raw2tiff
tiff2bw
tiff2pdf
tiff2ps
tiff2rgba
tiffcmp
tiffcp
tiffcrop
tiffdither
tiffdump
tiffinfo
tiffmedian
tiffset
tiffsplit
AUTO_CLEAN
)
endif()
[LibLZMA] automatic configuration (#6000) * [LibLZMA] add a config-generated by CMake * bump control files of LibLZMA and dependent ports * [tiff] use proper liblzma target [OpenCV] add an explicit dependency on LibLZMA for static linking * [liblzma] fix header install path * [LibLZMA] avoid using targets in old symbols * fixes for windows-static and trying to see if CI is happier with a share/lib folder written in lowercase * [LibLZMA] use only modern CMake language, remove patch in favour of target public definition * [lzma] put symbols in cmake cache * [libxmlpp] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS regression * [lzma] fix header install path * [liblzma] install wrapper to force config mode * [liblzma] remove function check inside cmake config since we know it will pass * [liblzma] wrapper fix * [tiff,geotiff] general cleanup and patch fixes * [libgeotiff] remove debug tools * [tesseract] modernize * [tiff] fix also tiff_library symbol * [pdal,libgeotiff] better library integration * [tiff] restore using unix i/o on UWP, since it was working... for sure win32 one cannot work * [tiff] enable lzma also on uwp, since it works and is requested by many dependencies * [selene] enable build on arm/arm64-windows, which was surely broken before * [lzma] uniform naming with cmake 3.14 * [podofo] fix regression, it requires openssl which was disabled in dependencies * [many ports] remove unnecessary mods * [boost-iostream] chmod * [openssl] fix regression due to missing architecture * [podofo] fix regression on uwp due to missing include * [libpq] explicitly fail on UWP, it should avoid being marked as regression * [shiva] fix regression on linux
2019-05-29 07:58:00 +08:00
vcpkg_copy_pdbs()
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")