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.
5 import("//build/config/linux/pkg_config.gni")
6 import("//build/config/sysroot.gni")
10 cflags = [ "--sysroot=" + sysroot ]
11 ldflags = [ "--sysroot=" + sysroot ]
13 # Need to get some linker flags out of the sysroot.
14 ldflags += [ exec_script("sysroot_ld_path.py",
15 [ rebase_path("//build/linux/sysroot_ld_path.sh", ".", root_build_dir),
21 # Sets up the dynamic library search path to include our "lib" directory.
22 config("executable_ldconfig") {
24 # Want to pass "\$". Need to escape both '\' and '$'. GN will re-escape as
26 "-Wl,-rpath=\\\$ORIGIN/lib/",
28 "-Wl,-rpath-link=lib/",
32 config("fontconfig") {
33 libs = [ "fontconfig" ]
36 pkg_config("freetype2") {
37 packages = [ "freetype2" ]
41 packages = [ "glib-2.0", "gmodule-2.0", "gobject-2.0", "gthread-2.0" ]
45 # Gtk requires gmodule, but it does not list it as a dependency in some
46 # misconfigured systems.
47 packages = [ "gmodule-2.0", "gtk+-2.0", "gthread-2.0" ]
48 defines = [ "TOOLKIT_GTK" ]
51 pkg_config("pangocairo") {
52 packages = [ "pangocairo" ]
56 packages = [ "libudev" ]
60 # Don't bother running pkg-config for these X related libraries since it just
61 # returns the same libs, and forking pkg-config is slow.
62 defines = [ "USE_X11" ]