vcpkg/ports/harfbuzz/portfile.cmake

43 lines
1.1 KiB
CMake
Raw Normal View History

2016-10-08 03:09:58 +08:00
include(vcpkg_common_functions)
2018-01-01 16:19:40 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO behdad/harfbuzz
2018-06-16 13:16:58 +08:00
REF 1.8.1
SHA512 f54e5bda75acb7a1cb68fe672a1b918dbc40dcbb2034b04d626dd6b7a940e2b81ececc82bf9e33dc70c744f57175820c4e8756eb3605d8d8c33d367c0ffc8a13
2018-01-01 16:19:40 +08:00
HEAD_REF master
2016-10-08 03:09:58 +08:00
)
2017-05-29 17:26:27 +08:00
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
"${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch"
"${CMAKE_CURRENT_LIST_DIR}/find-package-freetype-2.patch"
2017-05-29 17:26:27 +08:00
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME)
2017-05-29 17:26:27 +08:00
SET(HAVE_GLIB "OFF")
SET(BUILTIN_UCDN "ON")
2017-05-29 17:26:27 +08:00
else()
SET(HAVE_GLIB "ON")
SET(BUILTIN_UCDN "OFF")
2017-05-29 17:26:27 +08:00
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DHB_HAVE_FREETYPE=ON
2017-05-29 17:26:27 +08:00
-DHB_HAVE_GLIB=${HAVE_GLIB}
-DHB_BUILTIN_UCDN=${BUILTIN_UCDN}
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
2016-10-08 03:09:58 +08:00
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
2017-01-26 18:25:24 +08:00
2016-10-08 03:09:58 +08:00
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/harfbuzz)
2016-10-08 03:09:58 +08:00
file(RENAME ${CURRENT_PACKAGES_DIR}/share/harfbuzz/COPYING ${CURRENT_PACKAGES_DIR}/share/harfbuzz/copyright)