diff options
author | David Knapp <psychicsurgeon@gmail.com> | 2016-04-05 23:53:00 -0700 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2016-04-08 02:11:45 -0400 |
commit | 27ee8d8943080a5dd735c9faa47c726604bafdff (patch) | |
tree | 4f4f783de5b9fcdafe63bdc96d8aa11f851846d6 | |
parent | 465bb6f5d13803819f329e4920bceb25a3887c6f (diff) | |
download | minetest-27ee8d8943080a5dd735c9faa47c726604bafdff.tar.gz minetest-27ee8d8943080a5dd735c9faa47c726604bafdff.tar.bz2 minetest-27ee8d8943080a5dd735c9faa47c726604bafdff.zip |
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
-rw-r--r-- | cmake/Modules/FindNcursesw.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/Modules/FindNcursesw.cmake b/cmake/Modules/FindNcursesw.cmake index dcb7cdda8..b8c7f78f2 100644 --- a/cmake/Modules/FindNcursesw.cmake +++ b/cmake/Modules/FindNcursesw.cmake @@ -147,6 +147,21 @@ if(CURSES_USE_NCURSESW) set(CURSES_HAVE_NCURSESW_CURSES_H "CURSES_HAVE_NCURSESW_CURSES_H-NOTFOUND") endif() endif() + if(NOT DEFINED CURSES_HAVE_NCURSES_H) + if(EXISTS "${CURSES_INCLUDE_PATH}/ncurses.h") + set(CURSES_HAVE_NCURSES_H "${CURSES_INCLUDE_PATH}/ncurses.h") + else() + set(CURSES_HAVE_NCURSES_H "CURSES_HAVE_NCURSES_H-NOTFOUND") + endif() + endif() + if(NOT DEFINED CURSES_HAVE_CURSES_H) + if(EXISTS "${CURSES_INCLUDE_PATH}/curses.h") + set(CURSES_HAVE_CURSES_H "${CURSES_INCLUDE_PATH}/curses.h") + else() + set(CURSES_HAVE_CURSES_H "CURSES_HAVE_CURSES_H-NOTFOUND") + endif() + endif() + find_library(CURSES_FORM_LIBRARY form HINTS "${_cursesLibDir}" DOC "Path to libform.so or .lib or .a") |