|
1 |
| -set(warning_length 24) |
2 |
| -string(LENGTH "${CURRENT_BUILDTREES_DIR}" buildtrees_path_length) |
3 |
| -if(buildtrees_path_length GREATER warning_length AND CMAKE_HOST_WIN32) |
4 |
| - message(WARNING "${PORT}'s buildsystem uses very long paths and may fail on your system.\n" |
5 |
| - "We recommend moving vcpkg to a short path such as 'C:\\vcpkg' or using the subst command." |
6 |
| - ) |
7 |
| -endif() |
8 |
| - |
9 |
| -vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION} |
10 |
| -vcpkg_from_gitlab( |
11 |
| - OUT_SOURCE_PATH SOURCE_PATH |
12 |
| - GITLAB_URL https://gitlab.gnome.org |
13 |
| - REPO GNOME/gtk |
14 |
| - REF "${VERSION}" |
15 |
| - SHA512 20a91e30a89070461af06b33829bc723b348806b4a785d0743af8bd4789b55dade24686e08bf1b2f0335240463aacc040134babb0605b809186b15de9cf261e4 |
16 |
| - PATCHES |
17 |
| - 0001-build.patch |
18 |
| - cairo-cpp-linkage.patch |
19 |
| -) |
20 |
| - |
21 |
| -vcpkg_find_acquire_program(PKGCONFIG) |
22 |
| -get_filename_component(PKGCONFIG_DIR "${PKGCONFIG}" DIRECTORY ) |
23 |
| -vcpkg_add_to_path("${PKGCONFIG_DIR}") # Post install script runs pkg-config so it needs to be on PATH |
24 |
| -vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/glib/") |
25 |
| -vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gdk-pixbuf") |
26 |
| -vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gettext/bin") |
27 |
| - |
28 |
| -if("introspection" IN_LIST FEATURES) |
29 |
| - if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static") |
30 |
| - message(FATAL_ERROR "Feature introspection currently only supports dynamic build.") |
31 |
| - endif() |
32 |
| - list(APPEND OPTIONS_DEBUG -Dintrospection=false) |
33 |
| - list(APPEND OPTIONS_RELEASE -Dintrospection=true) |
34 |
| -else() |
35 |
| - list(APPEND OPTIONS -Dintrospection=false) |
36 |
| -endif() |
37 |
| - |
38 |
| -if(CMAKE_HOST_WIN32 AND VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") |
39 |
| - set(GIR_TOOL_DIR ${CURRENT_INSTALLED_DIR}) |
40 |
| -else() |
41 |
| - set(GIR_TOOL_DIR ${CURRENT_HOST_INSTALLED_DIR}) |
42 |
| -endif() |
43 |
| - |
44 |
| -vcpkg_configure_meson( |
45 |
| - SOURCE_PATH "${SOURCE_PATH}" |
46 |
| - OPTIONS |
47 |
| - ${OPTIONS} |
48 |
| - -Dwayland_backend=true |
49 |
| - -Ddemos=false |
50 |
| - -Dexamples=false |
51 |
| - -Dtests=false |
52 |
| - -Dgtk_doc=false |
53 |
| - -Dman=false |
54 |
| - -Dxinerama=no # Enable support for the X11 Xinerama extension |
55 |
| - -Dcloudproviders=false # Enable the cloudproviders support |
56 |
| - -Dprofiler=false # include tracing support for sysprof |
57 |
| - -Dtracker3=false # Enable Tracker3 filechooser search |
58 |
| - -Dcolord=no # Build colord support for the CUPS printing backend |
59 |
| - OPTIONS_DEBUG |
60 |
| - ${OPTIONS_DEBUG} |
61 |
| - OPTIONS_RELEASE |
62 |
| - ${OPTIONS_RELEASE} |
63 |
| - ADDITIONAL_BINARIES |
64 |
| - "glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'" |
65 |
| - "glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'" |
66 |
| - "glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}'" |
67 |
| - "gdbus-codegen='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/gdbus-codegen'" |
68 |
| - "glib-compile-schemas='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-schemas${VCPKG_HOST_EXECUTABLE_SUFFIX}'" |
69 |
| - "g-ir-compiler='${CURRENT_HOST_INSTALLED_DIR}/tools/gobject-introspection/g-ir-compiler${VCPKG_HOST_EXECUTABLE_SUFFIX}'" |
70 |
| - "g-ir-scanner='${GIR_TOOL_DIR}/tools/gobject-introspection/g-ir-scanner'" |
71 |
| -) |
72 |
| - |
73 |
| -# Reduce command line lengths, in particular for static windows builds. |
74 |
| -foreach(dir IN ITEMS "${TARGET_TRIPLET}-dbg" "${TARGET_TRIPLET}-rel") |
75 |
| - if(EXISTS "${CURRENT_BUILDTREES_DIR}/${dir}/build.ninja") |
76 |
| - vcpkg_replace_string("${CURRENT_BUILDTREES_DIR}/${dir}/build.ninja" "/${dir}/../src/" "/src/") |
77 |
| - endif() |
78 |
| -endforeach() |
79 |
| -vcpkg_install_meson(ADD_BIN_TO_PATH) |
80 |
| - |
81 |
| -vcpkg_copy_pdbs() |
82 |
| - |
83 |
| -vcpkg_fixup_pkgconfig() |
84 |
| - |
85 |
| -set(GTK_TOOLS |
86 |
| - gtk-builder-tool |
87 |
| - gtk-encode-symbolic-svg |
88 |
| - gtk-launch |
89 |
| - gtk-query-immodules-3.0 |
90 |
| - gtk-query-settings |
91 |
| - gtk-update-icon-cache |
92 |
| -) |
93 |
| -vcpkg_copy_tools(TOOL_NAMES ${GTK_TOOLS} AUTO_CLEAN) |
94 |
| - |
95 |
| -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc") |
96 |
| -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") |
97 |
| - |
98 |
| -file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) |
| 1 | +set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
0 commit comments