Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame^] | 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 | |
| 5 | import("//build/config/linux/pkg_config.gni") |
| 6 | |
| 7 | group("linux") { |
| 8 | visibility = [ "//:optimize_gn_gen" ] |
| 9 | } |
| 10 | |
| 11 | # This is included by reference in the //build/config/compiler config that |
| 12 | # is applied to all targets. It is here to separate out the logic that is |
| 13 | # Linux-only. This is not applied to Android, but is applied to ChromeOS. |
| 14 | config("compiler") { |
| 15 | cflags = [ "-pthread" ] |
| 16 | ldflags = [ "-pthread" ] |
| 17 | } |
| 18 | |
| 19 | # This is included by reference in the //build/config/compiler:runtime_library |
| 20 | # config that is applied to all targets. It is here to separate out the logic |
| 21 | # that is Linux-only. Please see that target for advice on what should go in |
| 22 | # :runtime_library vs. :compiler. |
| 23 | config("runtime_library") { |
| 24 | # Set here because OS_CHROMEOS cannot be autodetected in build_config.h like |
| 25 | # OS_LINUX and the like. |
| 26 | if (is_chromeos) { |
| 27 | defines = [ "OS_CHROMEOS" ] |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | config("fontconfig") { |
| 32 | visibility = [ "//build/linux:fontconfig" ] |
| 33 | libs = [ "fontconfig" ] |
| 34 | } |
| 35 | |
| 36 | config("x11") { |
| 37 | libs = [ |
| 38 | "X11", |
| 39 | "Xcomposite", |
| 40 | "Xcursor", |
| 41 | "Xdamage", |
| 42 | "Xext", |
| 43 | "Xfixes", |
| 44 | "Xi", |
| 45 | "Xrender", |
| 46 | "Xtst", |
| 47 | ] |
| 48 | } |
| 49 | |
| 50 | config("xcomposite") { |
| 51 | libs = [ "Xcomposite" ] |
| 52 | } |
| 53 | |
| 54 | config("xext") { |
| 55 | libs = [ "Xext" ] |
| 56 | } |
| 57 | |
| 58 | config("xrandr") { |
| 59 | libs = [ "Xrandr" ] |
| 60 | } |
| 61 | |
| 62 | config("xscrnsaver") { |
| 63 | libs = [ "Xss" ] |
| 64 | } |
| 65 | |
| 66 | config("xfixes") { |
| 67 | libs = [ "Xfixes" ] |
| 68 | } |
| 69 | |
| 70 | config("libcap") { |
| 71 | libs = [ "cap" ] |
| 72 | } |
| 73 | |
| 74 | config("xi") { |
| 75 | libs = [ "Xi" ] |
| 76 | } |
| 77 | |
| 78 | config("xtst") { |
| 79 | libs = [ "Xtst" ] |
| 80 | } |
| 81 | |
| 82 | config("libresolv") { |
| 83 | libs = [ "resolv" ] |
| 84 | } |
| 85 | |
| 86 | pkg_config("glib") { |
| 87 | packages = [ |
| 88 | "glib-2.0", |
| 89 | "gmodule-2.0", |
| 90 | "gobject-2.0", |
| 91 | "gthread-2.0", |
| 92 | ] |
| 93 | } |