blob: e6ae9e0f205b23c171e0d9309465df791c2801ca (
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
29
30
31
32
|
src/gui/curses/CMakeLists.txt | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/gui/curses/CMakeLists.txt b/src/gui/curses/CMakeLists.txt
index 284956f..492fc77 100644
--- a/src/gui/curses/CMakeLists.txt
+++ b/src/gui/curses/CMakeLists.txt
@@ -35,7 +35,14 @@ main.c)
set(EXECUTABLE weechat)
-find_package(Ncurses)
+
+find_package(PkgConfig)
+pkg_search_module(NCURSES ncursesw ncurses)
+
+if(NOT NCURSES_FOUND)
+ find_package(Ncurses)
+endif(NCURSES_FOUND)
+
if(NCURSES_FOUND)
check_include_files(ncursesw/ncurses.h NCURSESW_HEADERS)
if(NCURSESW_HEADERS)
@@ -46,7 +53,7 @@ if(NCURSES_FOUND)
add_definitions(-DHAVE_NCURSES_H)
endif()
endif()
- list(APPEND EXTRA_LIBS ${NCURSES_LIBRARY})
+ list(APPEND EXTRA_LIBS ${NCURSES_LIBRARY} ${NCURSES_LIBRARIES} )
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|