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()
include(CheckLibraryExists)
check_library_exists(termcap tgetent "" HAVE_LIBTERMCAP)
if (HAVE_LIBTERMCAP)
check_library_exists(curses tgetent "" HAVE_LIBCURSES)
if (HAVE_LIBCURSES)
if(NOT DEFINED ENV{SKIP_EXEC})
target_link_libraries(nvim termcap)
target_link_libraries(nvim curses)
endif()
if(NOT DEFINED ENV{SKIP_UNITTEST})
target_link_libraries(nvim-test termcap)
target_link_libraries(nvim-test curses)
endif()
else()
check_library_exists(curses tgetent "" HAVE_LIBCURSES)
if (HAVE_LIBCURSES)
if(NOT DEFINED ENV{SKIP_EXEC})
target_link_libraries(nvim curses)
endif()
if(NOT DEFINED ENV{SKIP_UNITTEST})
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()
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()