qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older


From: Marc-André Lureau
Subject: Re: [PATCH] meson.build: Use -Wno-undef only for SDL 2.0.8 and older
Date: Wed, 31 May 2023 17:32:59 +0400



On Wed, May 31, 2023 at 1:40 PM Thomas Huth <thuth@redhat.com> wrote:
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>

Reviewed-by: Marc-André Lureau <marcandre.lureau@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




--
Marc-André Lureau

reply via email to

[Prev in Thread] Current Thread [Next in Thread]