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-08-01 08:03:35 +08:00
|
|
|
REF 1.8.4
|
|
|
|
SHA512 92742b754713d1df8975d4d8467de04765784d7fd566b7e07e7e7a261b0338e997a5fc11fa4fe282d6d5540d242db40c993812fbc4a881becd95fd3aae598c80
|
2018-01-01 16:19:40 +08:00
|
|
|
HEAD_REF master
|
2016-10-08 03:09:58 +08:00
|
|
|
)
|
2017-04-15 20:39:04 +08:00
|
|
|
|
2017-05-29 17:26:27 +08:00
|
|
|
vcpkg_apply_patches(
|
2017-10-28 05:00:17 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
2018-01-19 02:45:34 +08:00
|
|
|
PATCHES
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch"
|
2018-03-24 01:01:07 +08:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/find-package-freetype-2.patch"
|
2018-07-10 08:29:28 +08:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/glib-cmake.patch"
|
2017-05-29 17:26:27 +08:00
|
|
|
)
|
|
|
|
|
2018-07-03 21:24:02 +08:00
|
|
|
SET(HB_HAVE_ICU "OFF")
|
|
|
|
if("icu" IN_LIST FEATURES)
|
|
|
|
SET(HB_HAVE_ICU "ON")
|
|
|
|
endif()
|
|
|
|
|
2018-07-04 22:08:45 +08:00
|
|
|
## Unicode callbacks
|
|
|
|
|
|
|
|
# Builtin (UCDN)
|
|
|
|
set(BUILTIN_UCDN OFF)
|
|
|
|
if("ucdn" IN_LIST FEATURES)
|
|
|
|
set(BUILTIN_UCDN ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Glib
|
|
|
|
set(HAVE_GLIB OFF)
|
|
|
|
if("glib" IN_LIST FEATURES)
|
|
|
|
set(HAVE_GLIB ON)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# At least one Unicode callback must be specified, or harfbuzz compilation fails
|
|
|
|
if(NOT (BUILTIN_UCDN OR HAVE_GLIB))
|
|
|
|
message(FATAL_ERROR "Error: At least one Unicode callback must be specified (ucdn, glib).")
|
2017-05-29 17:26:27 +08:00
|
|
|
endif()
|
|
|
|
|
2017-04-15 20:39:04 +08:00
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
OPTIONS
|
|
|
|
-DHB_HAVE_FREETYPE=ON
|
2017-05-29 17:26:27 +08:00
|
|
|
-DHB_BUILTIN_UCDN=${BUILTIN_UCDN}
|
2018-07-03 21:24:02 +08:00
|
|
|
-DHB_HAVE_ICU=${HB_HAVE_ICU}
|
2018-07-04 22:08:45 +08:00
|
|
|
-DHB_HAVE_GLIB=${HAVE_GLIB}
|
2017-04-15 20:39:04 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DSKIP_INSTALL_HEADERS=ON
|
2016-10-08 03:09:58 +08:00
|
|
|
)
|
|
|
|
|
2017-04-15 20:39:04 +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
|
2016-12-08 07:35:23 +08:00
|
|
|
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)
|