2023-01-10 06:15:51 +08:00
|
|
|
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
2019-10-08 01:35:13 +08:00
|
|
|
|
2022-05-07 02:20:25 +08:00
|
|
|
vcpkg_from_gitlab(
|
|
|
|
GITLAB_URL https://gitlab.gnome.org/
|
2019-09-18 02:34:55 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2022-05-07 02:20:25 +08:00
|
|
|
REPO GNOME/atk
|
2023-01-10 06:15:51 +08:00
|
|
|
REF "${VERSION}"
|
2022-05-07 02:20:25 +08:00
|
|
|
HEAD_REF master
|
|
|
|
SHA512 f31951ecbdace6a18fb9f772616137cb8732163b37448fef4daf1af60ba8479c94d498dcdaf4880468c80012c77a446da585926a99704a9a940b80e546080cf3
|
2019-09-18 02:34:55 +08:00
|
|
|
)
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2023-01-18 03:44:20 +08:00
|
|
|
if("introspection" IN_LIST FEATURES)
|
|
|
|
list(APPEND OPTIONS_DEBUG -Dintrospection=false)
|
|
|
|
list(APPEND OPTIONS_RELEASE -Dintrospection=true)
|
|
|
|
else()
|
|
|
|
list(APPEND OPTIONS -Dintrospection=false)
|
|
|
|
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(
|
2022-05-07 02:20:25 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-01-10 06:15:51 +08:00
|
|
|
OPTIONS
|
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'"
|
2021-04-27 01:28:21 +08:00
|
|
|
)
|
2023-01-18 03:44:20 +08:00
|
|
|
vcpkg_install_meson(ADD_BIN_TO_PATH)
|
2019-05-03 13:57:43 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2020-12-08 00:27:33 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2023-01-10 06:15:51 +08:00
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/atk-1.0/atk/atkmisc.h" "ifdef ATK_STATIC_COMPILATION" "if 1")
|
|
|
|
endif()
|
|
|
|
|
2021-04-27 01:28:21 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2023-07-18 04:02:56 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|