OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/sysroot.gni") | 5 import("//build/config/sysroot.gni") |
6 | 6 |
7 # Defines a config specifying the result of running pkg-config for the given | 7 # Defines a config specifying the result of running pkg-config for the given |
8 # packages. Put the package names you want to query in the "packages" variable | 8 # packages. Put the package names you want to query in the "packages" variable |
9 # inside the template invocation. | 9 # inside the template invocation. |
10 # | 10 # |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 } | 45 } |
46 | 46 |
47 pkg_config_script = "//build/config/linux/pkg-config.py" | 47 pkg_config_script = "//build/config/linux/pkg-config.py" |
48 | 48 |
49 # Define the args we pass to the pkg-config script for other build files that | 49 # Define the args we pass to the pkg-config script for other build files that |
50 # need to invoke it manually. | 50 # need to invoke it manually. |
51 if (sysroot != "") { | 51 if (sysroot != "") { |
52 # Pass the sysroot if we're using one (it requires the CPU arch also). | 52 # Pass the sysroot if we're using one (it requires the CPU arch also). |
53 pkg_config_args = [ | 53 pkg_config_args = [ |
54 "-s", | 54 "-s", |
55 sysroot, | 55 rebase_path(sysroot), |
56 "-a", | 56 "-a", |
57 current_cpu, | 57 current_cpu, |
58 "--system_libdir", | 58 "--system_libdir", |
59 system_libdir, | 59 system_libdir, |
60 ] | 60 ] |
61 } else if (pkg_config != "") { | 61 } else if (pkg_config != "") { |
62 pkg_config_args = [ | 62 pkg_config_args = [ |
63 "-p", | 63 "-p", |
64 pkg_config, | 64 pkg_config, |
65 "--system_libdir", | 65 "--system_libdir", |
(...skipping 22 matching lines...) Expand all Loading... |
88 ldflags = pkgresult[4] | 88 ldflags = pkgresult[4] |
89 } | 89 } |
90 | 90 |
91 forward_variables_from(invoker, | 91 forward_variables_from(invoker, |
92 [ | 92 [ |
93 "defines", | 93 "defines", |
94 "visibility", | 94 "visibility", |
95 ]) | 95 ]) |
96 } | 96 } |
97 } | 97 } |
OLD | NEW |