vcpkg/ports/harfbuzz/portfile.cmake

43 lines
1.2 KiB
CMake

include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO behdad/harfbuzz
REF 1.7.5
SHA512 c6e0e91203fdf3cbc8e4fd3c5d5cdb8fd8d0c87609b2c35433a42c92721a7f707612cad339eb4871cae8f7e129245e93f1509f21ca45a0a81d44225e2207cbdc
HEAD_REF master
)
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch"
"${CMAKE_CURRENT_LIST_DIR}/find-package-freetype.patch"
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
SET(HAVE_GLIB "OFF")
SET(BUILTIN_UCDN "ON")
else()
SET(HAVE_GLIB "ON")
SET(BUILTIN_UCDN "OFF")
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DHB_HAVE_FREETYPE=ON
-DHB_HAVE_GLIB=${HAVE_GLIB}
-DHB_BUILTIN_UCDN=${BUILTIN_UCDN}
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/harfbuzz/COPYING ${CURRENT_PACKAGES_DIR}/share/harfbuzz/copyright)