summaryrefslogtreecommitdiff
path: root/cmake/FindNcurses.cmake
diff options
context:
space:
mode:
authorSimmo Saan <simmo.saan@gmail.com>2019-05-13 13:48:39 +0000
committerSimmo Saan <simmo.saan@gmail.com>2019-05-13 13:48:39 +0000
commit980d26956fe550a63de3df4017567b6811c8d7ba (patch)
tree512f7ab01320031a6a6e86b678cb885e774a46e8 /cmake/FindNcurses.cmake
parent5910bcf3c827cf47843d4221f2dd0f15e90f0ffa (diff)
downloadweechat-980d26956fe550a63de3df4017567b6811c8d7ba.zip
gui: fix wide ncurses header on FreeBSD (issue #1343)
Diffstat (limited to 'cmake/FindNcurses.cmake')
-rw-r--r--cmake/FindNcurses.cmake20
1 files changed, 16 insertions, 4 deletions
diff --git a/cmake/FindNcurses.cmake b/cmake/FindNcurses.cmake
index 9531dec31..7c62506ed 100644
--- a/cmake/FindNcurses.cmake
+++ b/cmake/FindNcurses.cmake
@@ -23,14 +23,22 @@ endif()
find_path(NCURSES_INCLUDE_PATH
NAMES ncurses.h curses.h
- PATHS /usr/include/ncursesw /usr/include/ncurses /usr/include
- /usr/local/include/ncursesw /usr/local/include/ncurses /usr/local/include
+ PATHS /usr/local/include/ncursesw /usr/local/include/ncurses /usr/local/include
/usr/pkg/include/ncursesw /usr/pkg/include/ncurses /usr/pkg/include
+ /usr/include/ncursesw /usr/include/ncurses /usr/include
+ NO_DEFAULT_PATH
+)
+find_path(NCURSES_INCLUDE_PATH
+ NAMES ncurses.h curses.h
)
find_library(NCURSESW_LIBRARY
NAMES ncursesw
- PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
+ PATHS /usr/local/lib /usr/pkg/lib /usr/lib /lib
+ NO_DEFAULT_PATH
+)
+find_library(NCURSESW_LIBRARY
+ NAMES ncursesw
)
if(NCURSESW_LIBRARY)
@@ -43,7 +51,11 @@ if(NCURSESW_LIBRARY)
else()
find_library(NCURSES_LIBRARY
NAMES ncurses
- PATHS /lib /usr/lib /usr/local/lib /usr/pkg/lib
+ PATHS /usr/local/lib /usr/pkg/lib /usr/lib /lib
+ NO_DEFAULT_PATH
+ )
+ find_library(NCURSES_LIBRARY
+ NAMES ncurses
)
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)