All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meson: Fixes curses detection on msys2
@ 2020-11-16 21:31 Yonggang Luo
  2020-11-18  8:31 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Yonggang Luo @ 2020-11-16 21:31 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: QEMU Trivial, Yonggang Luo

Fixes regression on curses detection in msys2
by commit#925a40df2828d32d3aaaf022282cba81082fb263

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 meson.build | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index bbff0880f4..8695f7d1c2 100644
--- a/meson.build
+++ b/meson.build
@@ -494,10 +494,15 @@ if have_system and not get_option('curses').disabled()
       return 0;
     }'''
 
-  curses = dependency((targetos == 'windows' ? 'ncurses' : 'ncursesw'),
-                      required: false,
-                      method: 'pkg-config',
-                      static: enable_static)
+  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',
+                          static: enable_static)
+    endif
+  endforeach
   msg = get_option('curses').enabled() ? 'curses library not found' : ''
   if curses.found()
     if cc.links(curses_test, dependencies: [curses])
-- 
2.28.0.windows.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] meson: Fixes curses detection on msys2
  2020-11-16 21:31 [PATCH] meson: Fixes curses detection on msys2 Yonggang Luo
@ 2020-11-18  8:31 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2020-11-18  8:31 UTC (permalink / raw)
  To: Yonggang Luo, qemu-devel; +Cc: QEMU Trivial

On 16/11/20 22:31, Yonggang Luo wrote:
> Fixes regression on curses detection in msys2
> by commit#925a40df2828d32d3aaaf022282cba81082fb263
> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>   meson.build | 13 +++++++++----
>   1 file changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index bbff0880f4..8695f7d1c2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -494,10 +494,15 @@ if have_system and not get_option('curses').disabled()
>         return 0;
>       }'''
>   
> -  curses = dependency((targetos == 'windows' ? 'ncurses' : 'ncursesw'),
> -                      required: false,
> -                      method: 'pkg-config',
> -                      static: enable_static)
> +  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',
> +                          static: enable_static)
> +    endif
> +  endforeach
>     msg = get_option('curses').enabled() ? 'curses library not found' : ''
>     if curses.found()
>       if cc.links(curses_test, dependencies: [curses])
> 

Queued, thanks.

Paolo



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-18  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 21:31 [PATCH] meson: Fixes curses detection on msys2 Yonggang Luo
2020-11-18  8:31 ` Paolo Bonzini

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.