diff options
-rw-r--r-- | src/CMakeLists.txt | 9 |
1 files 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. |