summaryrefslogtreecommitdiff
path: root/chromium/tools/gn/secondary/build/config/linux/system/BUILD.gn
blob: 3cecca8d4b37bae8cee85a1ea1d2c263f1c70efe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

pkg_script = "pkg-config.py"

config("glib") {
  glib_packages = "glib-2.0 gmodule-2.0 gobject-2.0 gthread-2.0"

  cflags = exec_script(pkg_script, [ "--cflags", glib_packages ], "list lines")
  ldflags = exec_script(pkg_script, [ "--libs", glib_packages ], "list lines")
  # if (use_x11) {  # TODO(brettw) need to add use_x11
    ldflags += "-lXtst"
  #}
}

config("gtk") {
  # Gtk requires gmodule, but it does not list it as a dependency in some
  # misconfigured systems.
  gtk_packages = "gmodule-2.0 gtk+-2.0 gthread-2.0"

  cflags = exec_script(pkg_script, [ "--cflags", gtk_packages ], "list lines")
  ldflags = exec_script(pkg_script, [ "--libs", gtk_packages ], "list lines")
}

config("x11") {
  x11_packages = "x11 xi"

  cflags = exec_script(pkg_script, [ "--cflags", x11_packages ], "list lines")
  ldflags = exec_script(pkg_script, [ "--libs", x11_packages ], "list lines")
}