Bug 1954903 - Allow to use system PipeWire libs instead of bundled r=stransky,mjf
Introduce "--with-system-pipewire" option, allowing to build Firefox against system PipeWire library and to find system PipeWire header files. Differential Revision: https://phabricator.services.mozilla.com/D242100
This commit is contained in:
@@ -20,11 +20,12 @@ def gen_wrappers(unused, outdir, *header_list):
|
||||
for header in header_list:
|
||||
with FileAvoidWrite(os.path.join(outdir, header)) as f:
|
||||
includes = include_next_template.format(header=header)
|
||||
if header == "wayland-util.h":
|
||||
# wayland-util.h in Wayland < 1.12 includes math.h inside an
|
||||
# extern "C" block, which breaks including the header from C++.
|
||||
# This was fixed in Wayland 1.12, but for versions earlier than
|
||||
# that, we work around that by force-including math.h first.
|
||||
if header == "wayland-util.h" or header == "pipewire/pipewire.h":
|
||||
# wayland-util.h in Wayland < 1.12 and pipewire.h > 1.4 include
|
||||
# math.h inside an extern "C" block, which breaks including the
|
||||
# header from C++. This was fixed in Wayland 1.12, but for versions
|
||||
# earlier than that, we work around that by force-including math.h
|
||||
# first.
|
||||
includes = "#include <math.h>\n" + includes
|
||||
elif header == "wayland-client.h":
|
||||
# The system wayland-client.h uses quote includes for
|
||||
|
||||
@@ -1267,6 +1267,11 @@ if CONFIG["MOZ_SYSTEM_LIBDRM"]:
|
||||
"xf86drm.h",
|
||||
]
|
||||
|
||||
if CONFIG["MOZ_SYSTEM_PIPEWIRE"]:
|
||||
system_headers += [
|
||||
"pipewire/pipewire.h",
|
||||
]
|
||||
|
||||
if CONFIG["MOZ_JACK"]:
|
||||
system_headers += [
|
||||
"jack/jack.h",
|
||||
|
||||
Reference in New Issue
Block a user