blob: cd5bbf4dddb195c1a63681b06229b83a067992df [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Defines a config specifying the result of running pkg-config for the given
# packages. Put the package names you want to query in the "pkg_deps" variable
# inside the template invocation.
template("pkg_config") {
config(target_name) {
forward_variables_from(invoker, [ "pkg_deps" ])
assert(defined(pkg_deps), "pkg_deps must be set")
ldflags = exec_script("//common-mk/args_generator_wrapper.py",
[ pkg_config ] + pkg_deps + [
"--libs-only-L",
"--libs-only-other",
],
"list lines")
libs = exec_script("//common-mk/args_generator_wrapper.py",
[ pkg_config ] + pkg_deps + [ "--libs-only-l" ],
"list lines")
cflags = exec_script("//common-mk/args_generator_wrapper.py",
[ pkg_config ] + pkg_deps + [ "--cflags" ],
"list lines")
}
}