core: add fix for ncurses with separate tinfo (closes #1090)

This commit is contained in:
alyptik 2017-10-27 01:28:50 +02:00 committed by Sébastien Helleu
parent 09f3edc2e6
commit 7a17941a5b

View File

@ -34,12 +34,22 @@ find_library(NCURSESW_LIBRARY
)
if(NCURSESW_LIBRARY)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_search_module(NCURSES ncursesw)
set(NCURSESW_LIBRARY ${NCURSES_LIBRARIES} ${NCURSES_CFLAGS_OTHER})
endif()
set(NCURSES_LIBRARY ${NCURSESW_LIBRARY})
else()
find_library(NCURSES_LIBRARY
NAMES ncurses
PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_search_module(NCURSES ncurses)
set(NCURSES_LIBRARY ${NCURSES_LIBRARIES} ${NCURSES_CFLAGS_OTHER})
endif()
if(NCURSES_LIBRARY)
message("*** WARNING:\n"
"*** ncursesw library not found! Falling back to \"ncurses\"\n"