On Mon, Dec 28, 2020 at 11:51 PM Chris Hofstaedtler <
chris@hofstaedtler.name> wrote:
>
> Without this, meson fails with "curses package not usable"
> when using ncurses 6.2. Apparently the wide functions
> (addwstr, etc) are hidden behind the extra define, and
> meson does not define it at that detection stage.
>
> Signed-off-by: Chris Hofstaedtler <
chris@hofstaedtler.name>
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 9c152a85bd..7b9d92c14a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -510,7 +510,7 @@ if have_system and not get_option('curses').disabled()
> endforeach
> msg = get_option('curses').enabled() ? 'curses library not found' : ''
> if curses.found()
> - if cc.links(curses_test, dependencies: [curses])
> + if cc.links(curses_test, args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses])
> else
> msg = 'curses package not usable'
> --
> 2.29.2
>
>
Better to share
curses_compile_args
--- a/meson.build
+++ b/meson.build
@@ -504,16 +504,16 @@ if have_system and not get_option('curses').disabled()
endif
endforeach
msg = get_option('curses').enabled() ? 'curses library not found' : ''
+ curses_compile_args = ['-DNCURSES_WIDECHAR']
if curses.found()
- if cc.links(curses_test, dependencies: [curses])
- curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses])
+ if cc.links(curses_test, args: curses_compile_args, dependencies: [curses])
+ curses = declare_dependency(compile_args: curses_compile_args, dependencies: [curses])
else
msg = 'curses package not usable'
curses = not_found
endif
endif
if not curses.found()
- curses_compile_args = ['-DNCURSES_WIDECHAR']
has_curses_h = cc.has_header('curses.h', args: curses_compile_args)
if targetos != 'windows' and not has_curses_h
message('Trying with /usr/include/ncursesw')
--
2.29.2.windows.3
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo