No longer try to use standalone termcap

This commit is contained in:
Marcel Krüger 2014-03-07 21:00:06 +01:00
parent 002f2327fe
commit 7efc429276

View File

@ -53,33 +53,21 @@ if(NOT DEFINED ENV{SKIP_UNITTEST})
endif() endif()
include(CheckLibraryExists) include(CheckLibraryExists)
check_library_exists(termcap tgetent "" HAVE_LIBTERMCAP) check_library_exists(curses tgetent "" HAVE_LIBCURSES)
if (HAVE_LIBCURSES)
if (HAVE_LIBTERMCAP)
if(NOT DEFINED ENV{SKIP_EXEC}) if(NOT DEFINED ENV{SKIP_EXEC})
target_link_libraries(nvim termcap) target_link_libraries(nvim curses)
endif() endif()
if(NOT DEFINED ENV{SKIP_UNITTEST}) if(NOT DEFINED ENV{SKIP_UNITTEST})
target_link_libraries(nvim-test termcap) target_link_libraries(nvim-test curses)
endif() endif()
else() else()
check_library_exists(curses tgetent "" HAVE_LIBCURSES) find_package(Curses REQUIRED)
if (HAVE_LIBCURSES) if(NOT DEFINED ENV{SKIP_EXEC})
if(NOT DEFINED ENV{SKIP_EXEC}) target_link_libraries(nvim ${CURSES_LIBRARIES})
target_link_libraries(nvim curses) endif()
endif() if(DEFINED ENV{SKIP_UNITTEST})
if(NOT DEFINED ENV{SKIP_UNITTEST}) target_link_libraries(nvim-test ${CURSES_LIBRARIES})
target_link_libraries(nvim-test curses)
endif()
else()
find_package(Curses REQUIRED)
if(NOT DEFINED ENV{SKIP_EXEC})
target_link_libraries(nvim ${CURSES_LIBRARIES})
endif()
if(DEFINED ENV{SKIP_UNITTEST})
target_link_libraries(nvim-test ${CURSES_LIBRARIES})
endif()
endif() endif()
endif() endif()