blob: aee651911ce7e2bf6fe8d1d3b54854b85a1ae5a4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
Use pkgconfig to find ncurses libs in order to support separate libtinfo.
--- weechat-2.1/src/gui/curses/normal/CMakeLists.txt
+++ weechat-2.1/src/gui/curses/normal/CMakeLists.txt
@@ -32,7 +32,13 @@
../gui-curses-window.c
)
-find_package(Ncurses)
+find_package(PkgConfig)
+pkg_search_module(NCURSES ncursesw ncurses)
+
+if(NOT NCURSES_FOUND)
+ find_package(Ncurses)
+endif(NOT NCURSES_FOUND)
+
if(NCURSES_FOUND)
check_include_files(ncursesw/ncurses.h NCURSESW_HEADERS)
if(NCURSESW_HEADERS)
@@ -57,7 +63,7 @@
add_dependencies(${EXECUTABLE} weechat_gui_curses_normal)
-list(APPEND EXTRA_LIBS ${NCURSES_LIBRARY})
+list(APPEND EXTRA_LIBS ${NCURSES_LIBRARY} ${NCURSES_LIBRARIES})
# Due to circular references, we must link two times with libweechat_core.a and libweechat_gui_common.a
target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_curses_normal ${EXTRA_LIBS} ${STATIC_LIBS})
|