FindCurses pulls in -lform rather than -lformw despite CURSES_NEED_WIDE
For motivations I don't quite understand, FindCurses.cmake gives you the ncurses forms library just for wanting ncurses (the two ought be distinct modules IMHO, or at least form ought require an explicit request). That wouldn't be a big problem, except when I'm using ncursesw via CURSES_NEED_WIDE, I get regular form (as opposed to formw). This drags in regular libncurses.so (in addition to libncursesw.so), and I lose reliable wide character support:
[schwarzgerat](0) $ ldd outcurses-demo | grep ncurses
libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007fe568097000)
libncurses.so.6 => /lib/x86_64-linux-gnu/libncurses.so.6 (0x00007fe567e65000)
[schwarzgerat](0) $ ldd /usr/lib/x86_64-linux-gnu/libform.so
linux-vdso.so.1 (0x00007ffd355d7000)
libncurses.so.6 => /lib/x86_64-linux-gnu/libncurses.so.6 (0x00007f4824dc0000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f4824d91000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4824bd1000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4824bcc000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4824e72000)
[schwarzgerat](0) $
If I manually link without the spurious /usr/lib/x86_64-linux-gnu/libform.so
, I only get ncursesw.so, and wide characters work as expected.
I can put a patch together for this quickly (tonight, probably). I suppose it's too late for 3.16?