From a57030d28cf8e6f3e792ebfdc9d52e1c1ac17562 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Tue, 22 Apr 2014 21:43:49 -0300 Subject: [PATCH] Use libtinfo as a fallback for curses This will be done before running the FindCurses cmake module --- src/CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a49c84ba42..7f6649d15e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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.