[Lldb-commits] [PATCH] D12900: Fix link failures when BUILD_SHARED_LIBS=ON.
Kamil Rytarowski via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 18 05:03:33 PDT 2015
krytarowski added a subscriber: krytarowski.
krytarowski requested changes to this revision.
krytarowski added a reviewer: krytarowski.
This revision now requires changes to proceed.
================
Comment at: tools/lldb-server/CMakeLists.txt:40
@@ +39,3 @@
+ if (NOT LLDB_DISABLE_CURSES)
+ target_link_libraries(lldb-server ncurses panel)
+ endif()
----------------
This approach of linking external entities is broken on NetBSD (pkgsrc). pkgsrc installs libraries under custom prefix and `target_link_libraries` is deaf to it. There is additional issue with handling includes, I need for it ``config.h``.
The correct one is to use `find_package(Curses)` and link against `${CURSES_LIBRARIES}`
```
if (NOT LLDB_DISABLE_CURSES)
set(CURSES_NEED_NCURSES TRUE)
find_package(Curses REQUIRED)
find_library(NCURSES_PANEL_LIBRARY NAMES panel DOC "The ncureses panel library")
if (CURSES_FOUND)
# Add panels to the library path
set (CURSES_LIBRARIES ${CURSES_LIBRARIES} ${NCURSES_PANEL_LIBRARY})
endif ()
endif ()
```
I'm in process of preparing a proper ncurses handling, CMake is done and with autotools/gmake I need to research it bit more (properly add `config.h` in the autotools target).
http://reviews.llvm.org/D12900
More information about the lldb-commits
mailing list