1# Copyright (c) 2013 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/config/linux/pkg_config.gni")
6import("//build/config/ui.gni")
7
8group("linux") {
9  visibility = [ "//:optimize_gn_gen" ]
10}
11
12# This is included by reference in the //build/config/compiler config that
13# is applied to all targets. It is here to separate out the logic that is
14# Linux-only. This is not applied to Android, but is applied to ChromeOS.
15config("compiler") {
16}
17
18# This is included by reference in the //build/config/compiler:runtime_library
19# config that is applied to all targets. It is here to separate out the logic
20# that is Linux-only. Please see that target for advice on what should go in
21# :runtime_library vs. :compiler.
22config("runtime_library") {
23  # Set here because OS_CHROMEOS cannot be autodetected in build_config.h like
24  # OS_LINUX and the like.
25  if (is_chromeos) {
26    defines = [ "OS_CHROMEOS" ]
27  }
28}
29
30config("x11") {
31  libs = [
32    "X11",
33    "X11-xcb",
34    "xcb",
35    "Xcomposite",
36    "Xcursor",
37    "Xdamage",
38    "Xext",
39    "Xfixes",
40    "Xi",
41    "Xrender",
42  ]
43
44  if (!build_with_mozilla) {
45    libs += [
46      "Xtst",
47    ]
48  }
49}
50
51config("xcomposite") {
52  libs = [ "Xcomposite" ]
53}
54
55config("xext") {
56  libs = [ "Xext" ]
57}
58
59config("xrandr") {
60  libs = [ "Xrandr" ]
61}
62
63config("xscrnsaver") {
64  libs = [ "Xss" ]
65}
66
67config("xfixes") {
68  libs = [ "Xfixes" ]
69}
70
71config("libcap") {
72  libs = [ "cap" ]
73}
74
75config("xi") {
76  libs = [ "Xi" ]
77}
78
79if (!build_with_mozilla) {
80  config("xtst") {
81    libs = [ "Xtst" ]
82  }
83}
84
85config("libresolv") {
86  libs = [ "resolv" ]
87}
88
89if (use_glib) {
90  pkg_config("glib") {
91    packages = [
92      "glib-2.0",
93      "gmodule-2.0",
94      "gobject-2.0",
95      "gthread-2.0",
96    ]
97    defines = [
98      "GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32",
99      "GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26",
100    ]
101  }
102}
103