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

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