aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8c19098f1e..aa1100032a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -13,6 +13,7 @@ list(APPEND NEOVIM_SOURCES "${PROJECT_BINARY_DIR}/config/auto/pathdef.c")
file( GLOB OS_SOURCES os/*.c )
add_executable (nvim ${NEOVIM_SOURCES} ${OS_SOURCES})
+add_library (nvim-test SHARED ${NEOVIM_SOURCES} ${OS_SOURCES})
# The libraries we link against for nvim
set(NVIM_LINK_LIBRARIES m ${LibUV_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
@@ -28,19 +29,23 @@ if (LibIntl_FOUND)
endif()
target_link_libraries (nvim ${NVIM_LINK_LIBRARIES})
+target_link_libraries (nvim-test ${NVIM_LINK_LIBRARIES})
include(CheckLibraryExists)
check_library_exists(termcap tgetent "" HAVE_LIBTERMCAP)
if (HAVE_LIBTERMCAP)
target_link_libraries(nvim termcap)
+ target_link_libraries(nvim-test termcap)
else()
check_library_exists(curses tgetent "" HAVE_LIBCURSES)
if (HAVE_LIBCURSES)
target_link_libraries(nvim curses)
+ target_link_libraries(nvim-test curses)
else()
find_package(Curses REQUIRED)
target_link_libraries(nvim ${CURSES_LIBRARIES})
+ target_link_libraries(nvim-test ${CURSES_LIBRARIES})
endif()
endif()