diff mbox series

[PULL,10/14] meson: multiple names can be passed to dependency()

Message ID 20220929163014.16950-11-pbonzini@redhat.com
State New
Headers show
Series [PULL,01/14] x86: return modified setup_data only if read as memory, not as file | expand

Commit Message

Paolo Bonzini Sept. 29, 2022, 4:30 p.m. UTC
This is new in Meson 0.60.0.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 meson.build | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 8c1139a82b..48533ace7b 100644
--- a/meson.build
+++ b/meson.build
@@ -825,14 +825,10 @@  if have_system and get_option('curses').allowed()
     }'''
 
   curses_dep_list = targetos == 'windows' ? ['ncurses', 'ncursesw'] : ['ncursesw']
-  foreach curses_dep : curses_dep_list
-    if not curses.found()
-      curses = dependency(curses_dep,
-                          required: false,
-                          method: 'pkg-config',
-                          kwargs: static_kwargs)
-    endif
-  endforeach
+  curses = dependency(curses_dep_list,
+                      required: false,
+                      method: 'pkg-config',
+                      kwargs: static_kwargs)
   msg = get_option('curses').enabled() ? 'curses library not found' : ''
   curses_compile_args = ['-DNCURSES_WIDECHAR=1']
   if curses.found()