From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Laurent Vivier" <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org, Akihiko Odaki <akihiko.odaki@daynix.com>
Subject: [PATCH v3 2/3] meson: Add dbus_display1 to util_ss and genh
Date: Sat, 16 Dec 2023 16:53:31 +0900 [thread overview]
Message-ID: <20231216-dbus-v3-2-b4bcbed7374a@daynix.com> (raw)
In-Reply-To: <20231216-dbus-v3-0-b4bcbed7374a@daynix.com>
Adding dbus_display1 to util_ss ensures that the source will be linked
with audio/dbus. It also avoids recompilation when linking with
dbus-display-test.
Adding dbus_display1 to genh ensures that dbus-display1.h is generated
before compiling ui/dbus, audio/dbus, and dbus-display-test.
Both changes combined, it is no longer necessary for ui/dbus, audio/dbus,
and dbus-display-test to explicitly state the dependency on
dbus_display1.
Fixes: 142ca628a733 ("ui: add a D-Bus display backend")
Fixes: 739362d4205c ("audio: add "dbus" audio backend")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
meson.build | 6 ++++--
tests/qtest/meson.build | 2 +-
ui/meson.build | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 5e1b25a47184..c5808d410361 100644
--- a/meson.build
+++ b/meson.build
@@ -2014,6 +2014,7 @@ dbus_display = get_option('dbus_display') \
error_message: gdbus_codegen_error.format('-display dbus')) \
.allowed()
+dbus_display1_ss = ss.source_set()
if dbus_display
env = environment()
env.set('TARGETOS', targetos)
@@ -2031,8 +2032,8 @@ if dbus_display
'--interface-prefix', 'org.qemu.',
'--c-namespace', 'QemuDBus',
'--generate-c-code', '@BASENAME@'])
- dbus_display1_lib = static_library('dbus-display1', dbus_display1, dependencies: gio)
- dbus_display1_dep = declare_dependency(link_with: dbus_display1_lib, include_directories: include_directories('.'))
+ dbus_display1_ss.add(dbus_display1)
+ genh += dbus_display1[0]
endif
have_virtfs = get_option('virtfs') \
@@ -3433,6 +3434,7 @@ event_loop_base = declare_dependency(link_whole: event_loop_base,
stub_ss = stub_ss.apply(config_all, strict: false)
+util_ss.add_all(dbus_display1_ss)
util_ss.add_all(trace_ss)
util_ss = util_ss.apply(config_all, strict: false)
libqemuutil = static_library('qemuutil',
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 47dabf91d048..225cd35e4664 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -332,7 +332,7 @@ if vnc.found()
endif
if dbus_display
- qtests += {'dbus-display-test': [dbus_display1, gio]}
+ qtests += {'dbus-display-test': [gio]}
endif
qtest_executables = {}
diff --git a/ui/meson.build b/ui/meson.build
index bbb7c5242d55..21d1d3b27f29 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -75,7 +75,7 @@ endif
if dbus_display
dbus_ss = ss.source_set()
- dbus_ss.add(when: [gio, dbus_display1_dep],
+ dbus_ss.add(when: [gio],
if_true: [files(
'dbus-chardev.c',
'dbus-clipboard.c',
--
2.43.0
next prev parent reply other threads:[~2023-12-16 7:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-16 7:53 [PATCH v3 0/3] meson: Fixes for dbus modules Akihiko Odaki
2023-12-16 7:53 ` [PATCH v3 1/3] Move dbus-display1 out of ui Akihiko Odaki
2023-12-16 16:57 ` Philippe Mathieu-Daudé
2023-12-17 6:14 ` Akihiko Odaki
2023-12-16 7:53 ` Akihiko Odaki [this message]
2023-12-16 7:53 ` [PATCH v3 3/3] audio: Do not include ui/dbus.h Akihiko Odaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231216-dbus-v3-2-b4bcbed7374a@daynix.com \
--to=akihiko.odaki@daynix.com \
--cc=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).