瀏覽代碼

Merge topic 'FindCurses-nodelay'

3211e07dc6 FindCurses: Detect and satisfy dependency on tinfo for nodelay

Acked-by: Kitware Robot <[email protected]>
Merge-request: !4892
Brad King 5 年之前
父節點
當前提交
b065d25821
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Modules/FindCurses.cmake

+ 3 - 1
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}" )