vcpkg/ports/leptonica/portfile.cmake

38 lines
1.1 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
REF 2ff4313a85427ceb272540c570106b2f893da097 # 1.81.1
SHA512 0e35538f1407e7220e68d635e5fd4c82219b58fb4b6ca8132d72892f52853e13451a2a160644a122c47598f77d2e87046cfb072be261be9a941342f476dc6376
2017-08-16 23:08:15 +08:00
HEAD_REF master
PATCHES
fix-cmakelists.patch
find-dependency.patch
fix-find-libwebp.patch
Modify-include-dir.patch
2017-08-16 23:08:15 +08:00
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" STATIC)
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
-DCPPAN_BUILD=OFF
-DSTATIC=${STATIC}
2017-08-16 23:08:15 +08:00
-DCMAKE_REQUIRED_INCLUDES=${CURRENT_INSTALLED_DIR}/include # for check_include_file()
MAYBE_UNUSED_VARIABLES
STATIC
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)
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)