Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net
https://www.clamav.net/
GNU General Public License v2.0
4.27k stars 692 forks source link

CMake: improve ncurses detection; separate TINFO_LIBRARY input #1356

Open micahsnyder opened 1 month ago

micahsnyder commented 1 month ago

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.