Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: build/config/linux/pkg_config.gni

Issue 1914103002: GN: Respect system libdir whenever building with the traget sysroot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 ] 58 ]
59 } else if (pkg_config != "") { 59 } else if (pkg_config != "") {
60 pkg_config_args = [ 60 pkg_config_args = [
61 "-p", 61 "-p",
62 pkg_config, 62 pkg_config,
63 ] 63 ]
64 } else { 64 } else {
65 pkg_config_args = [] 65 pkg_config_args = []
66 } 66 }
67 67
68 # Only use the custom libdir when building with the default toolchain. 68 # Only use the custom libdir when building with the target sysroot.
69 if (current_toolchain == default_toolchain) { 69 if (target_sysroot != "" && sysroot == target_sysroot) {
70 pkg_config_args += [ 70 pkg_config_args += [
71 "--system_libdir", 71 "--system_libdir",
72 system_libdir, 72 system_libdir,
73 ] 73 ]
74 } 74 }
75 75
76 template("pkg_config") { 76 template("pkg_config") {
77 assert(defined(invoker.packages), 77 assert(defined(invoker.packages),
78 "Variable |packages| must be defined to be a list in pkg_config.") 78 "Variable |packages| must be defined to be a list in pkg_config.")
79 config(target_name) { 79 config(target_name) {
(...skipping 12 matching lines...) Expand all
92 ldflags = pkgresult[4] 92 ldflags = pkgresult[4]
93 } 93 }
94 94
95 forward_variables_from(invoker, 95 forward_variables_from(invoker,
96 [ 96 [
97 "defines", 97 "defines",
98 "visibility", 98 "visibility",
99 ]) 99 ])
100 } 100 }
101 } 101 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698