2023-01-10 06:15:51 +08:00
|
|
|
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
2021-05-18 15:38:23 +08:00
|
|
|
vcpkg_from_gitlab(
|
|
|
|
GITLAB_URL https://gitlab.gnome.org/
|
2019-11-04 06:10:24 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2021-05-18 15:38:23 +08:00
|
|
|
REPO GNOME/pango
|
2023-01-10 06:15:51 +08:00
|
|
|
REF "${VERSION}"
|
2023-04-18 09:09:34 +08:00
|
|
|
SHA512 5de67e711a1f25bd2c741162bb8306ae380d134f95b9103db6e96864d3a1100321ce106d8238dca54e746cd8f1cfdbe50cc407878611d3d09694404f3f128c73
|
2023-01-10 06:15:51 +08:00
|
|
|
HEAD_REF master
|
2021-05-18 15:38:23 +08:00
|
|
|
)
|
2019-11-04 06:10:24 +08:00
|
|
|
|
2023-07-20 05:16:49 +08:00
|
|
|
# Fix for https://github.com/microsoft/vcpkg/issues/31573
|
|
|
|
# Mimics patch for Gentoo https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f688df5100ef2b88c975ecd40fd343c62e2ab276
|
|
|
|
# Silence false positive with GCC 13 and -O3 at least
|
|
|
|
# https://gitlab.gnome.org/GNOME/pango/-/issues/740
|
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/meson.build" "-Werror=array-bounds" "")
|
|
|
|
|
2023-01-18 03:44:20 +08:00
|
|
|
if("introspection" IN_LIST FEATURES)
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
message(FATAL_ERROR "Feature introspection currently only supports dynamic build.")
|
|
|
|
endif()
|
|
|
|
list(APPEND OPTIONS_DEBUG -Dintrospection=disabled)
|
|
|
|
list(APPEND OPTIONS_RELEASE -Dintrospection=enabled)
|
|
|
|
else()
|
|
|
|
list(APPEND OPTIONS -Dintrospection=disabled)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
|
|
set(GIR_TOOL_DIR ${CURRENT_INSTALLED_DIR})
|
|
|
|
else()
|
|
|
|
set(GIR_TOOL_DIR ${CURRENT_HOST_INSTALLED_DIR})
|
|
|
|
endif()
|
|
|
|
|
2021-04-27 01:28:21 +08:00
|
|
|
vcpkg_configure_meson(
|
2023-01-10 06:15:51 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-04-27 01:28:21 +08:00
|
|
|
OPTIONS
|
|
|
|
-Dfontconfig=enabled # Build with FontConfig support.
|
|
|
|
-Dsysprof=disabled # include tracing support for sysprof
|
2021-08-28 08:06:39 +08:00
|
|
|
-Dlibthai=disabled # Build with libthai support
|
2021-04-27 01:28:21 +08:00
|
|
|
-Dcairo=enabled # Build with cairo support
|
|
|
|
-Dxft=disabled # Build with xft support
|
|
|
|
-Dfreetype=enabled # Build with freetype support
|
|
|
|
-Dgtk_doc=false #Build API reference for Pango using GTK-Doc
|
2023-01-18 03:44:20 +08:00
|
|
|
${OPTIONS}
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
${OPTIONS_DEBUG}
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
${OPTIONS_RELEASE}
|
2023-01-10 06:15:51 +08:00
|
|
|
ADDITIONAL_BINARIES
|
|
|
|
"glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'"
|
|
|
|
"glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'"
|
2023-01-18 03:44:20 +08:00
|
|
|
"g-ir-compiler='${CURRENT_HOST_INSTALLED_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'"
|
|
|
|
"g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'"
|
2019-11-04 06:10:24 +08:00
|
|
|
)
|
|
|
|
|
2023-01-18 03:44:20 +08:00
|
|
|
vcpkg_install_meson(ADD_BIN_TO_PATH)
|
2021-04-27 01:28:21 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2019-11-04 06:10:24 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-12-01 02:16:41 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES pango-view pango-list pango-segmentation AUTO_CLEAN)
|
2021-04-27 01:28:21 +08:00
|
|
|
|
2023-07-14 02:35:00 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|