Skip to content

Commit 27ee8d8

Browse files
Falmarrikwolekr
authored andcommittedApr 8, 2016
Fix ncurses lookup on Arch Linux
Arch Linux doesn't put it's ncursesw includes inside an ncursesw directory. This script ends up setting USE_CURSES as true, but doesn't pick up any of the headers. https://bugs.archlinux.org/task/13994
1 parent 465bb6f commit 27ee8d8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 

‎cmake/Modules/FindNcursesw.cmake

+15
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,21 @@ if(CURSES_USE_NCURSESW)
147147
set(CURSES_HAVE_NCURSESW_CURSES_H "CURSES_HAVE_NCURSESW_CURSES_H-NOTFOUND")
148148
endif()
149149
endif()
150+
if(NOT DEFINED CURSES_HAVE_NCURSES_H)
151+
if(EXISTS "${CURSES_INCLUDE_PATH}/ncurses.h")
152+
set(CURSES_HAVE_NCURSES_H "${CURSES_INCLUDE_PATH}/ncurses.h")
153+
else()
154+
set(CURSES_HAVE_NCURSES_H "CURSES_HAVE_NCURSES_H-NOTFOUND")
155+
endif()
156+
endif()
157+
if(NOT DEFINED CURSES_HAVE_CURSES_H)
158+
if(EXISTS "${CURSES_INCLUDE_PATH}/curses.h")
159+
set(CURSES_HAVE_CURSES_H "${CURSES_INCLUDE_PATH}/curses.h")
160+
else()
161+
set(CURSES_HAVE_CURSES_H "CURSES_HAVE_CURSES_H-NOTFOUND")
162+
endif()
163+
endif()
164+
150165

151166
find_library(CURSES_FORM_LIBRARY form HINTS "${_cursesLibDir}"
152167
DOC "Path to libform.so or .lib or .a")

0 commit comments

Comments
 (0)