diff mbox series

[v6,08/13,FIXUP] meson: Fix SDL dependency fallback check

Message ID 20220829013327.5791-9-laurent.pinchart@ideasonboard.com
State New
Headers show
Series Add support for meson building | expand

Commit Message

Laurent Pinchart Aug. 29, 2022, 1:33 a.m. UTC
The SDL2 or SDL2_image can't be found using pkgconfig, we fall back to
searching for them using the find_library() function. This treats the
dependencies as required by mistake, unlike the dependency() calls that
correctly set 'required' to false. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index fce8a09b390b..a6816e2bee16 100644
--- a/meson.build
+++ b/meson.build
@@ -81,12 +81,12 @@  endif
 
 dep_sdl = dependency('SDL2', required: false)
 if not dep_sdl.found()
-    dep_sdl = cc.find_library('SDL2', has_headers: 'SDL2/SDL.h')
+    dep_sdl = cc.find_library('SDL2', has_headers: 'SDL2/SDL.h', required: false)
 endif
 
 dep_sdl_image = dependency('SDL2_image', required: false)
 if not dep_sdl_image.found()
-    dep_sdl_image = cc.find_library('SDL2_image', has_headers: 'SDL2/SDL_image.h')
+    dep_sdl_image = cc.find_library('SDL2_image', has_headers: 'SDL2/SDL_image.h', required: false)
 endif
 
 dep_threads = dependency('threads')