Use libtinfo as a fallback for curses

This will be done before running the FindCurses cmake module
This commit is contained in:
Thiago de Arruda 2014-04-22 21:43:49 -03:00
parent a1a0c00589
commit a57030d28c

View File

@ -71,8 +71,13 @@ check_library_exists(curses tgetent "" HAVE_LIBCURSES)
if (HAVE_LIBCURSES)
list(APPEND NVIM_LINK_LIBRARIES curses)
else()
find_package(Curses REQUIRED)
list(APPEND NVIM_LINK_LIBRARIES ${CURSES_LIBRARIES})
check_library_exists(tinfo tgetent "" HAVE_LIBTINFO)
if (HAVE_LIBTINFO)
list(APPEND NVIM_LINK_LIBRARIES tinfo)
else()
find_package(Curses REQUIRED)
list(APPEND NVIM_LINK_LIBRARIES ${CURSES_LIBRARIES})
endif()
endif()
# Put these last on the link line, since multiple things may depend on them.