I found that on macOS, setting the libncurses.a and libtinfo.a into the same CURSES_LIBRARY variable does not find or link with libtinfo.a.
To fix this, this commit adds a separate TINFO_LIBRARY variable. In the end, CURSES_LIBRARIES and the Curses::curses CMake TARGET will still have both libraries set, if both are provided.
This fix is necessary if the ncurses was built with --with-terminfo. I think we got away without it on Linux because of pkg-config.
I found that on macOS, setting the libncurses.a and libtinfo.a into the same CURSES_LIBRARY variable does not find or link with libtinfo.a.
To fix this, this commit adds a separate TINFO_LIBRARY variable. In the end, CURSES_LIBRARIES and the Curses::curses CMake TARGET will still have both libraries set, if both are provided.
This fix is necessary if the ncurses was built with
--with-terminfo
. I think we got away without it on Linux because of pkg-config.