[Cmake-commits] CMake branch, next, updated. v3.0.0-rc4-2771-g6012f71

Rolf Eike Beer eike at sf-mail.de
Mon May 5 18:03:34 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  6012f71119506f0d759025b2384e7314dbcb5fe5 (commit)
       via  43e03e71e8753b12afa53094669ee42a4be0fce8 (commit)
      from  79386d8516a11a0a86fd41f499aa397091497e7c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6012f71119506f0d759025b2384e7314dbcb5fe5
commit 6012f71119506f0d759025b2384e7314dbcb5fe5
Merge: 79386d8 43e03e7
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Mon May 5 18:03:33 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon May 5 18:03:33 2014 -0400

    Merge topic 'ncurses-tinfo' into next
    
    43e03e71 FindCurses: fix cbreak not being found when ncurses is linked against terminfo


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43e03e71e8753b12afa53094669ee42a4be0fce8
commit 43e03e71e8753b12afa53094669ee42a4be0fce8
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Mon May 5 23:59:20 2014 +0200
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Tue May 6 00:02:47 2014 +0200

    FindCurses: fix cbreak not being found when ncurses is linked against terminfo
    
    Patch by Mark Wright.
    
    Please don't merge yet, maybe this will be replaced by a properly attributed
    patch.
    
    See https://bugs.gentoo.org/show_bug.cgi?id=468622 for more information.

diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index fa420c1..9b633c7 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -40,7 +40,7 @@ find_library(CURSES_CURSES_LIBRARY NAMES curses )
 find_library(CURSES_NCURSES_LIBRARY NAMES ncurses )
 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)
 endif()
 # http://cygwin.com/ml/cygwin-announce/2010-01/msg00002.html
@@ -139,10 +139,20 @@ else()
       CACHE FILEPATH "The curses library" ${FORCE_IT})
   endif()
 
+  CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}"
+    cbreak "" CURSES_NCURSES_HAS_CBREAK)
+  if(NOT CURSES_NCURSES_HAS_CBREAK)
+    find_library(CURSES_EXTRA_LIBRARY tinfo HINTS "${_cursesLibDir}")
+    find_library(CURSES_EXTRA_LIBRARY tinfo )
+    CHECK_LIBRARY_EXISTS("${CURSES_EXTRA_LIBRARY}"
+      cbreak "" CURSES_TINFO_HAS_CBREAK)
+  endif()
 endif()
 
-find_library(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
-find_library(CURSES_EXTRA_LIBRARY cur_colr )
+if (NOT CURSES_TINFO_HAS_CBREAK)
+  find_library(CURSES_EXTRA_LIBRARY cur_colr HINTS "${_cursesLibDir}")
+  find_library(CURSES_EXTRA_LIBRARY cur_colr )
+endif()
 
 find_library(CURSES_FORM_LIBRARY form HINTS "${_cursesLibDir}")
 find_library(CURSES_FORM_LIBRARY form )
@@ -186,5 +196,7 @@ mark_as_advanced(
   CURSES_INCLUDE_DIR
   CURSES_CURSES_HAS_WSYNCUP
   CURSES_NCURSES_HAS_WSYNCUP
+  CURSES_NCURSES_HAS_CBREAK
+  CURSES_TINFO_HAS_CBREAK
   )
 

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindCurses.cmake |   18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list