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