FindCurses: Honor CURSES_NEED_NCURSES when curses is found

Take our CURSES_USE_NCURSES code path when CURSES_NEED_NCURSES is
enabled even if CURSES_CURSES_LIBRARY also happens to be found.

Applied-by: Rolf Eike Beer <eike@sf-mail.de>
This commit is contained in:
Mark Wright 2014-01-17 11:34:58 +00:00 committed by Brad King
parent c553d68798
commit 0e4a2c7e32
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ find_library(CURSES_CURSES_LIBRARY NAMES curses )
find_library(CURSES_NCURSES_LIBRARY NAMES ncurses ) find_library(CURSES_NCURSES_LIBRARY NAMES ncurses )
set(CURSES_USE_NCURSES FALSE) set(CURSES_USE_NCURSES FALSE)
if(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_LIBRARY) if(CURSES_NCURSES_LIBRARY AND ((NOT CURSES_CURSES_LIBRARY) OR CURSES_NEED_NCURSES))
set(CURSES_USE_NCURSES TRUE) set(CURSES_USE_NCURSES TRUE)
endif() endif()
# http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html # http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html