Skip to content

Commit b016178

Browse files
committed
FIXUP: Add missing pkg_config calls for system libs
Only call pkg_config in case of system libraries. It may fail otherwise (e.g. mac). Pick-to: 112-based Change-Id: I1d506a507eadec7423e71785777f50518f378861 Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/528389 Reviewed-by: Peter Varga <[email protected]> Reviewed-by: Michal Klocek <[email protected]>
1 parent 778d8d8 commit b016178

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

chromium/third_party/libevent/BUILD.gn

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,17 @@ shim_headers("libevent_shim") {
8484
headers = [ "event.h" ]
8585
}
8686

87-
pkg_config("libevent_from_pkgconfig") {
88-
packages = [ "libevent" ]
89-
}
87+
if (use_system_libevent) {
88+
pkg_config("libevent_from_pkgconfig") {
89+
packages = [ "libevent" ]
90+
}
9091

91-
source_set("system_libevent") {
92-
deps = [
93-
":libevent_shim",
94-
]
95-
public_configs = [ ":libevent_from_pkgconfig" ]
92+
source_set("system_libevent") {
93+
deps = [
94+
":libevent_shim",
95+
]
96+
public_configs = [ ":libevent_from_pkgconfig" ]
97+
}
9698
}
9799

98100
group("libevent") {

chromium/third_party/re2/BUILD.gn

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ fuzzer_test("third_party_re2_fuzzer") {
6868
deps = [ ":re2" ]
6969
}
7070

71-
pkg_config("re2_from_pkgconfig") {
72-
packages = [ "re2" ]
73-
}
74-
7571
shim_headers("re2_shim") {
7672
root_path = "src/re2"
7773
prefix = "re2/"
@@ -83,9 +79,15 @@ shim_headers("re2_shim") {
8379
]
8480
}
8581

86-
source_set("system_re2") {
87-
deps = [ ":re2_shim" ]
88-
public_configs = [ ":re2_from_pkgconfig" ]
82+
if (use_system_re2) {
83+
pkg_config("re2_from_pkgconfig") {
84+
packages = [ "re2" ]
85+
}
86+
87+
source_set("system_re2") {
88+
deps = [ ":re2_shim" ]
89+
public_configs = [ ":re2_from_pkgconfig" ]
90+
}
8991
}
9092

9193
group("re2") {

0 commit comments

Comments
 (0)