Create a custom template to allow writing package deps inside target definitions for platform2 GN files. |
||
Issue description
Currently
pkg_config("foo_config") {
pkg_deps = [ "bar" ]
}
static_library("foo") {
config += [ "foo_config" ]
}
is a idiom to use "bar" package config in "foo". Allow writing it as
p2_static_library("foo") {
pkg_deps = [ "bar" ]
}
introducing custom templates p2_*.
,
Sep 11
Disclaimer: I'm not very familiar with GN. Is it possible to keep using static_library? Having variants of every standard directives sounds not very great... If it's impossible, maybe we can contiunue defining pkg_config.
,
Sep 11
We can't keep using static_library. Unknown variables in a directive causes error. We can not post-process it.
,
Sep 11
Having variants for standard directive sounds not great, but seemingly is something common, e.g. v8_executable, v8_static_library. How about to keep pkg_config thingy for now, and if it turns out to be too irritating, reopen this bug?
,
Sep 11
sgtm. Thanks for consideration.
,
Sep 11
|
||
►
Sign in to add a comment |
||
Comment 1 by oka@chromium.org
, Sep 11