[CMake] Pass full libedit path to linker
authorTatyana Krasnukha <tatyana@synopsys.com>
Tue, 27 Nov 2018 19:41:30 +0000 (19:41 +0000)
committerTatyana Krasnukha <tatyana@synopsys.com>
Tue, 27 Nov 2018 19:41:30 +0000 (19:41 +0000)
Otherwise, linker fails with "cannot find -ledit" in case of custom libedit installation.

llvm-svn: 347693

lldb/source/Host/CMakeLists.txt
lldb/source/Utility/CMakeLists.txt

index 8ed6bcf..333f109 100644 (file)
@@ -155,7 +155,7 @@ if (HAVE_LIBDL)
   list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})
 endif()
 if (NOT LLDB_DISABLE_LIBEDIT)
-  list(APPEND EXTRA_LIBS edit)
+  list(APPEND EXTRA_LIBS ${libedit_LIBRARIES})
 endif()
 
 add_lldb_library(lldbHost
index fba5744..0756907 100644 (file)
@@ -9,7 +9,7 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
 endif ()
 
 if (NOT LLDB_DISABLE_LIBEDIT)
-  list(APPEND LLDB_SYSTEM_LIBS edit)
+  list(APPEND LLDB_SYSTEM_LIBS ${libedit_LIBRARIES})
 endif()
 if (NOT LLDB_DISABLE_CURSES)
   list(APPEND LLDB_SYSTEM_LIBS ${CURSES_LIBRARIES})