xref: /aosp_15_r20/external/angle/build/config/linux/gtk/BUILD.gn (revision 8975f5c5ed3d1c378011245431ada316dfb6f244)
1*8975f5c5SAndroid Build Coastguard Worker# Copyright 2016 The Chromium Authors
2*8975f5c5SAndroid Build Coastguard Worker# Use of this source code is governed by a BSD-style license that can be
3*8975f5c5SAndroid Build Coastguard Worker# found in the LICENSE file.
4*8975f5c5SAndroid Build Coastguard Worker
5*8975f5c5SAndroid Build Coastguard Workerimport("//build/config/linux/gtk/gtk.gni")
6*8975f5c5SAndroid Build Coastguard Workerimport("//build/config/linux/pkg_config.gni")
7*8975f5c5SAndroid Build Coastguard Worker
8*8975f5c5SAndroid Build Coastguard Workerassert(is_linux, "This file should only be referenced on Linux")
9*8975f5c5SAndroid Build Coastguard Worker
10*8975f5c5SAndroid Build Coastguard Worker# GN doesn't check visibility for configs so we give this an obviously internal
11*8975f5c5SAndroid Build Coastguard Worker# name to discourage random targets from accidentally depending on this and
12*8975f5c5SAndroid Build Coastguard Worker# bypassing the GTK target's visibility.
13*8975f5c5SAndroid Build Coastguard Workerpkg_config("gtk_internal_config") {
14*8975f5c5SAndroid Build Coastguard Worker  # Gtk requires gmodule, but it does not list it as a dependency in some
15*8975f5c5SAndroid Build Coastguard Worker  # misconfigured systems.
16*8975f5c5SAndroid Build Coastguard Worker  packages = [
17*8975f5c5SAndroid Build Coastguard Worker    "gmodule-2.0",
18*8975f5c5SAndroid Build Coastguard Worker    "gthread-2.0",
19*8975f5c5SAndroid Build Coastguard Worker  ]
20*8975f5c5SAndroid Build Coastguard Worker  if (gtk_version == 3) {
21*8975f5c5SAndroid Build Coastguard Worker    packages += [ "gtk+-3.0" ]
22*8975f5c5SAndroid Build Coastguard Worker  } else {
23*8975f5c5SAndroid Build Coastguard Worker    assert(gtk_version == 4)
24*8975f5c5SAndroid Build Coastguard Worker    packages += [ "gtk4" ]
25*8975f5c5SAndroid Build Coastguard Worker  }
26*8975f5c5SAndroid Build Coastguard Worker}
27*8975f5c5SAndroid Build Coastguard Worker
28*8975f5c5SAndroid Build Coastguard Workergroup("gtk") {
29*8975f5c5SAndroid Build Coastguard Worker  visibility = [
30*8975f5c5SAndroid Build Coastguard Worker    # These are allow-listed for WebRTC builds.  Nothing in else should depend
31*8975f5c5SAndroid Build Coastguard Worker    # on GTK.
32*8975f5c5SAndroid Build Coastguard Worker    "//examples:peerconnection_client",
33*8975f5c5SAndroid Build Coastguard Worker    "//remoting/host:common",
34*8975f5c5SAndroid Build Coastguard Worker    "//remoting/host:remoting_me2me_host_static",
35*8975f5c5SAndroid Build Coastguard Worker    "//remoting/host:x11_display_utils",
36*8975f5c5SAndroid Build Coastguard Worker    "//remoting/host/file_transfer",
37*8975f5c5SAndroid Build Coastguard Worker    "//remoting/host/it2me:common",
38*8975f5c5SAndroid Build Coastguard Worker    "//remoting/host/it2me:main",
39*8975f5c5SAndroid Build Coastguard Worker    "//remoting/host/linux",
40*8975f5c5SAndroid Build Coastguard Worker    "//remoting/host/remote_open_url:common",
41*8975f5c5SAndroid Build Coastguard Worker    "//remoting/test:it2me_standalone_host_main",
42*8975f5c5SAndroid Build Coastguard Worker    "//webrtc/examples:peerconnection_client",
43*8975f5c5SAndroid Build Coastguard Worker  ]
44*8975f5c5SAndroid Build Coastguard Worker
45*8975f5c5SAndroid Build Coastguard Worker  public_configs = [ ":gtk_internal_config" ]
46*8975f5c5SAndroid Build Coastguard Worker}
47