vcpkg/ports/leptonica/portfile.cmake

38 lines
1.3 KiB
CMake
Raw Normal View History

2017-08-16 23:08:15 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO DanBloomberg/leptonica
2023-02-01 10:04:06 +08:00
REF b667978e86c4bf74f7fdd75f833127d2de327550 # 1.83.1
SHA512 fe4ea74aea024a4e522a5f985e51c5b110b5b4a3b3086e6fa7204129caf09b842f85041c386ee9bf2e878034ac2ebd2506396063771b677e931296ec6d76490b
2017-08-16 23:08:15 +08:00
HEAD_REF master
PATCHES
2023-02-01 10:04:06 +08:00
fix-build-and-pkgconfig.patch # See https://github.com/DanBloomberg/leptonica/pull/664 and https://github.com/DanBloomberg/leptonica/pull/662
private.patch # See https://github.com/DanBloomberg/leptonica/pull/666
webp.patch # See https://github.com/DanBloomberg/leptonica/pull/667
2017-08-16 23:08:15 +08:00
)
2023-02-01 10:04:06 +08:00
vcpkg_find_acquire_program(PKGCONFIG)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
2017-08-16 23:08:15 +08:00
OPTIONS
2020-10-22 08:42:47 +08:00
-DSW_BUILD=OFF
2023-02-01 10:04:06 +08:00
-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}
-DCMAKE_REQUIRE_FIND_PACKAGE_GIF=TRUE
-DCMAKE_REQUIRE_FIND_PACKAGE_JPEG=TRUE
-DCMAKE_REQUIRE_FIND_PACKAGE_PNG=TRUE
-DCMAKE_REQUIRE_FIND_PACKAGE_TIFF=TRUE
-DCMAKE_REQUIRE_FIND_PACKAGE_ZLIB=TRUE
2017-08-16 23:08:15 +08:00
)
vcpkg_cmake_install()
2017-08-16 23:08:15 +08:00
vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/leptonica)
2017-08-16 23:08:15 +08:00
vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
2017-08-16 23:08:15 +08:00
file(INSTALL "${SOURCE_PATH}/leptonica-license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)