summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaymon MARANDI <darwinskernel@gmail.com>2020-06-14 14:37:54 -0400
committerBrad King <brad.king@kitware.com>2020-06-15 16:27:25 -0400
commit3211e07dc6f2b52570f7b9e1034a2e0394c83862 (patch)
tree54f8c056f3fb8a546ca8a2a115e66bbba9a37cb5
parent43b10e2411858ae7734c54480a8c0c6c3ccd659b (diff)
downloadcmake-3211e07dc6f2b52570f7b9e1034a2e0394c83862.tar.gz
FindCurses: Detect and satisfy dependency on tinfo for nodelay
Extend the change from commit 1f646c6ce0 (FindCurses: Detect and satisfy ncurses dependency on tinfo, 2014-01-17, v3.0.0-rc5~6^2) to handle `nodelay` too.
-rw-r--r--Modules/FindCurses.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index ba56078a50..cde3a4d2d7 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -156,7 +156,9 @@ if(CURSES_USE_NCURSES)
CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}"
cbreak "" CURSES_NCURSES_HAS_CBREAK)
- if(NOT CURSES_NCURSES_HAS_CBREAK)
+ CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}"
+ nodelay "" CURSES_NCURSES_HAS_NODELAY)
+ if(NOT CURSES_NCURSES_HAS_CBREAK OR NOT CURSES_NCURSES_HAS_NODELAY)
find_library(CURSES_EXTRA_LIBRARY "${CURSES_TINFO_LIBRARY_NAME}" HINTS "${_cursesLibDir}")
find_library(CURSES_EXTRA_LIBRARY "${CURSES_TINFO_LIBRARY_NAME}" )