From: Thomas Huth <thuth@redhat.com>
To: "Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
qemu-devel@nongnu.org
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
qemu-trivial@nongnu.org
Subject: [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older
Date: Wed, 31 May 2023 11:39:02 +0200 [thread overview]
Message-ID: <20230531093902.70695-1-thuth@redhat.com> (raw)
There is no need to disable this useful compiler warning for
newer versions of the SDL anymore.
This also enables the printing of the version number with
newer versions of the SDL in the summary of the meson output
again.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
meson.build | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index bc76ea96bf..8ccd928dca 100644
--- a/meson.build
+++ b/meson.build
@@ -1273,10 +1273,12 @@ if not get_option('sdl').auto() or have_system
sdl_image = not_found
endif
if sdl.found()
- # work around 2.0.8 bug
- sdl = declare_dependency(compile_args: '-Wno-undef',
- dependencies: sdl,
- version: sdl.version())
+ if sdl.version().version_compare('<=2.0.8')
+ # work around 2.0.8 bug
+ sdl = declare_dependency(compile_args: '-Wno-undef',
+ dependencies: sdl,
+ version: sdl.version())
+ endif
sdl_image = dependency('SDL2_image', required: get_option('sdl_image'),
method: 'pkg-config')
else
--
2.31.1
next reply other threads:[~2023-05-31 9:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 9:39 Thomas Huth [this message]
2023-05-31 13:32 ` [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older Marc-André Lureau
2023-05-31 15:34 ` Thomas Huth
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=20230531093902.70695-1-thuth@redhat.com \
--to=thuth@redhat.com \
--cc=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.