aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorYonggang Luo <luoyonggang@gmail.com>2020-11-17 05:31:06 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2020-11-18 09:31:00 +0100
commitca31e3072fa74a8de5a02311eb62396087774cf7 (patch)
treec3151df5c4ff8f8b71c043302c3cf5cca7b5fcb5 /meson.build
parentdccdb0f82a0d018443b12fb13d91655a10b0a151 (diff)
meson: Fixes curses detection on msys2
Fixes regression on curses detection in msys2 by commit#925a40df2828d32d3aaaf022282cba81082fb263 Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Message-Id: <20201116213106.589-1-luoyonggang@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 9 insertions, 4 deletions
diff --git a/meson.build b/meson.build
index 7ddf983ff7..5062407c70 100644
--- a/meson.build
+++ b/meson.build
@@ -490,10 +490,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])