From 4f06dd49f3b6a3982ebb62ef99f189350452fdd4 Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Thu, 1 Aug 2019 11:30:56 +0100 Subject: [PATCH] enable linking against luv.so module --- src/nvim/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 0fc7c780cac154..58458190b74e69 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -381,6 +381,12 @@ if(WIN32) list(APPEND NVIM_LINK_LIBRARIES ${WINPTY_LIBRARIES}) endif() +get_filename_component(LIBLUV_PATH ${LIBLUV_LIBRARIES} PATH) +get_filename_component(LIBLUV_NAME ${LIBLUV_LIBRARIES} NAME) +if(LIBLUV_NAME STREQUAL luv.so) + set(LIBLUV_LIBRARIES "-L ${LIBLUV_PATH} -l:${LIBLUV_NAME} -Wl,--rpath ${LIBLUV_PATH}") +endif() + # Put these last on the link line, since multiple things may depend on them. list(APPEND NVIM_LINK_LIBRARIES ${LIBLUV_LIBRARIES}