Skip to content

Commit

Permalink
FIXUP: Add missing pkg_config calls for system libs
Browse files Browse the repository at this point in the history
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 <pvarga@inf.u-szeged.hu>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
  • Loading branch information
mnegyokru committed Jan 5, 2024
1 parent 778d8d8 commit b016178
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
18 changes: 10 additions & 8 deletions chromium/third_party/libevent/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,17 @@ shim_headers("libevent_shim") {
headers = [ "event.h" ]
}

pkg_config("libevent_from_pkgconfig") {
packages = [ "libevent" ]
}
if (use_system_libevent) {
pkg_config("libevent_from_pkgconfig") {
packages = [ "libevent" ]
}

source_set("system_libevent") {
deps = [
":libevent_shim",
]
public_configs = [ ":libevent_from_pkgconfig" ]
source_set("system_libevent") {
deps = [
":libevent_shim",
]
public_configs = [ ":libevent_from_pkgconfig" ]
}
}

group("libevent") {
Expand Down
16 changes: 9 additions & 7 deletions chromium/third_party/re2/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ fuzzer_test("third_party_re2_fuzzer") {
deps = [ ":re2" ]
}

pkg_config("re2_from_pkgconfig") {
packages = [ "re2" ]
}

shim_headers("re2_shim") {
root_path = "src/re2"
prefix = "re2/"
Expand All @@ -83,9 +79,15 @@ shim_headers("re2_shim") {
]
}

source_set("system_re2") {
deps = [ ":re2_shim" ]
public_configs = [ ":re2_from_pkgconfig" ]
if (use_system_re2) {
pkg_config("re2_from_pkgconfig") {
packages = [ "re2" ]
}

source_set("system_re2") {
deps = [ ":re2_shim" ]
public_configs = [ ":re2_from_pkgconfig" ]
}
}

group("re2") {
Expand Down

0 comments on commit b016178

Please sign in to comment.