2017-08-16 23:08:15 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO DanBloomberg/leptonica
|
2021-09-17 01:50:15 +08:00
|
|
|
REF 2ff4313a85427ceb272540c570106b2f893da097 # 1.81.1
|
|
|
|
SHA512 0e35538f1407e7220e68d635e5fd4c82219b58fb4b6ca8132d72892f52853e13451a2a160644a122c47598f77d2e87046cfb072be261be9a941342f476dc6376
|
2017-08-16 23:08:15 +08:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
2019-08-22 05:01:57 +08:00
|
|
|
fix-cmakelists.patch
|
|
|
|
find-dependency.patch
|
|
|
|
fix-find-libwebp.patch
|
2021-09-17 01:50:15 +08:00
|
|
|
Modify-include-dir.patch
|
2017-08-16 23:08:15 +08:00
|
|
|
)
|
|
|
|
|
2017-11-16 10:56:44 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC)
|
|
|
|
|
2021-09-17 01:50:15 +08:00
|
|
|
vcpkg_cmake_configure(
|
2017-08-16 23:08:15 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
2020-10-22 08:42:47 +08:00
|
|
|
-DSW_BUILD=OFF
|
2021-09-17 01:50:15 +08:00
|
|
|
-DCPPAN_BUILD=OFF
|
2017-11-16 10:56:44 +08:00
|
|
|
-DSTATIC=${STATIC}
|
2017-08-16 23:08:15 +08:00
|
|
|
-DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file()
|
2021-09-17 01:50:15 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
STATIC
|
2017-08-16 23:08:15 +08:00
|
|
|
)
|
|
|
|
|
2021-09-17 01:50:15 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-08-16 23:08:15 +08:00
|
|
|
|
2021-09-17 01:50:15 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake)
|
2017-08-16 23:08:15 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-09-17 01:50:15 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-08-16 23:08:15 +08:00
|
|
|
|
2021-09-17 01:50:15 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/leptonica-license.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|