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, master has been updated via fa664d9863c559f977c20f7b681ee141a1481e16 (commit) via 72343d26049afb3a83ed6da134359f63790e5a2b (commit) via 4b02afc0caf46244f12f87f363ace6c1ab47fae5 (commit) from fc1aaf14329571c8cd58b3e1b85fbb434f8277b3 (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 ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fa664d9863c559f977c20f7b681ee141a1481e16 commit fa664d9863c559f977c20f7b681ee141a1481e16 Merge: fc1aaf1 72343d2 Author: Brad King <brad.k...@kitware.com> AuthorDate: Wed Aug 23 13:03:52 2017 +0000 Commit: Kitware Robot <kwro...@kitware.com> CommitDate: Wed Aug 23 09:03:58 2017 -0400 Merge topic 'FindCurses-wide' 72343d26 Help: Add notes for topic 'FindCurses-wide' 4b02afc0 FindCurses: Add option for ncursesw detection Acked-by: Kitware Robot <kwro...@kitware.com> Merge-request: !1161 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72343d26049afb3a83ed6da134359f63790e5a2b commit 72343d26049afb3a83ed6da134359f63790e5a2b Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Aug 22 10:44:18 2017 -0400 Commit: Brad King <brad.k...@kitware.com> CommitDate: Tue Aug 22 10:44:18 2017 -0400 Help: Add notes for topic 'FindCurses-wide' diff --git a/Help/release/dev/FindCurses-wide.rst b/Help/release/dev/FindCurses-wide.rst new file mode 100644 index 0000000..63fb671 --- /dev/null +++ b/Help/release/dev/FindCurses-wide.rst @@ -0,0 +1,5 @@ +FindCurses-wide +--------------- + +* The :module:`FindCurses` module gained a ``CURSES_NEED_WIDE`` option + to request the wide-character variant. https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b02afc0caf46244f12f87f363ace6c1ab47fae5 commit 4b02afc0caf46244f12f87f363ace6c1ab47fae5 Author: Alexandr (Sagrer) Gridnev <sag...@yandex.ru> AuthorDate: Mon Aug 21 21:07:02 2017 +0300 Commit: Brad King <brad.k...@kitware.com> CommitDate: Tue Aug 22 10:42:20 2017 -0400 FindCurses: Add option for ncursesw detection This is a remake of the patch from issue #10347 but based on current master. Works for me on Lubuntu 17.04. Fixes: #10347 diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake index 8d58d03..4f59d2c 100644 --- a/Modules/FindCurses.cmake +++ b/Modules/FindCurses.cmake @@ -29,6 +29,8 @@ # # Set ``CURSES_NEED_NCURSES`` to ``TRUE`` before the # ``find_package(Curses)`` call if NCurses functionality is required. +# Set ``CURSES_NEED_WIDE`` to ``TRUE`` before the +# ``find_package(Curses)`` call if unicode functionality is required. # # Backward Compatibility # ^^^^^^^^^^^^^^^^^^^^^^ @@ -42,9 +44,20 @@ include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake) +# we don't know anything about cursesw, so only ncurses +# may be ncursesw +if(NOT CURSES_NEED_WIDE) + set(NCURSES_LIBRARY_NAME "ncurses") +else() + set(NCURSES_LIBRARY_NAME "ncursesw") + # Also, if we are searchig fo wide curses - we are actually searching + # for ncurses, we don't know about any other unicode version. + set(CURSES_NEED_NCURSES TRUE) +endif() + find_library(CURSES_CURSES_LIBRARY NAMES curses ) -find_library(CURSES_NCURSES_LIBRARY NAMES ncurses ) +find_library(CURSES_NCURSES_LIBRARY NAMES "${NCURSES_LIBRARY_NAME}" ) set(CURSES_USE_NCURSES FALSE) if(CURSES_NCURSES_LIBRARY AND ((NOT CURSES_CURSES_LIBRARY) OR CURSES_NEED_NCURSES)) @@ -55,8 +68,14 @@ endif() # message. Cygwin is an ncurses package, so force ncurses on # cygwin if the curses.h is missing if(CYGWIN) - if(NOT EXISTS /usr/include/curses.h) - set(CURSES_USE_NCURSES TRUE) + if (CURSES_NEED_WIDE) + if(NOT EXISTS /usr/include/ncursesw/curses.h) + set(CURSES_USE_NCURSES TRUE) + endif() + else() + if(NOT EXISTS /usr/include/curses.h) + set(CURSES_USE_NCURSES TRUE) + endif() endif() endif() @@ -96,17 +115,32 @@ if(CURSES_USE_NCURSES) # Use CURSES_NCURSES_INCLUDE_PATH if set, for compatibility. if(CURSES_NCURSES_INCLUDE_PATH) + if (CURSES_NEED_WIDE) + find_path(CURSES_INCLUDE_PATH + NAMES ncursesw/ncurses.h ncursesw/curses.h + PATHS ${CURSES_NCURSES_INCLUDE_PATH} + NO_DEFAULT_PATH + ) + else() + find_path(CURSES_INCLUDE_PATH + NAMES ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h + PATHS ${CURSES_NCURSES_INCLUDE_PATH} + NO_DEFAULT_PATH + ) + endif() + endif() + + if (CURSES_NEED_WIDE) + find_path(CURSES_INCLUDE_PATH + NAMES ncursesw/ncurses.h ncursesw/curses.h + HINTS "${_cursesParentDir}/include" + ) + else() find_path(CURSES_INCLUDE_PATH NAMES ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h - PATHS ${CURSES_NCURSES_INCLUDE_PATH} - NO_DEFAULT_PATH + HINTS "${_cursesParentDir}/include" ) - endif() - - find_path(CURSES_INCLUDE_PATH - NAMES ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h - HINTS "${_cursesParentDir}/include" - ) + endif() # Previous versions of FindCurses provided these values. if(NOT DEFINED CURSES_LIBRARY) @@ -123,10 +157,14 @@ else() get_filename_component(_cursesLibDir "${CURSES_CURSES_LIBRARY}" PATH) get_filename_component(_cursesParentDir "${_cursesLibDir}" PATH) - find_path(CURSES_INCLUDE_PATH - NAMES curses.h - HINTS "${_cursesParentDir}/include" - ) + #We can't find anything with CURSES_NEED_WIDE because we know + #only about ncursesw unicode curses version + if(NOT CURSES_NEED_WIDE) + find_path(CURSES_INCLUDE_PATH + NAMES curses.h + HINTS "${_cursesParentDir}/include" + ) + endif() # Previous versions of FindCurses provided these values. if(NOT DEFINED CURSES_CURSES_H_PATH) @@ -139,31 +177,44 @@ endif() # Report whether each possible header name exists in the include directory. if(NOT DEFINED CURSES_HAVE_NCURSES_NCURSES_H) - if(EXISTS "${CURSES_INCLUDE_PATH}/ncurses/ncurses.h") + if(CURSES_NEED_WIDE) + if(EXISTS "${CURSES_INCLUDE_PATH}/ncursesw/ncurses.h") + set(CURSES_HAVE_NCURSES_NCURSES_H "${CURSES_INCLUDE_PATH}/ncursesw/ncurses.h") + endif() + elseif(EXISTS "${CURSES_INCLUDE_PATH}/ncurses/ncurses.h") set(CURSES_HAVE_NCURSES_NCURSES_H "${CURSES_INCLUDE_PATH}/ncurses/ncurses.h") - else() + endif() + if(NOT DEFINED CURSES_HAVE_NCURSES_NCURSES_H) set(CURSES_HAVE_NCURSES_NCURSES_H "CURSES_HAVE_NCURSES_NCURSES_H-NOTFOUND") endif() endif() if(NOT DEFINED CURSES_HAVE_NCURSES_CURSES_H) - if(EXISTS "${CURSES_INCLUDE_PATH}/ncurses/curses.h") + if(CURSES_NEED_WIDE) + if(EXISTS "${CURSES_INCLUDE_PATH}/ncursesw/curses.h") + set(CURSES_HAVE_NCURSES_CURSES_H "${CURSES_INCLUDE_PATH}/ncursesw/curses.h") + endif() + elseif(EXISTS "${CURSES_INCLUDE_PATH}/ncurses/curses.h") set(CURSES_HAVE_NCURSES_CURSES_H "${CURSES_INCLUDE_PATH}/ncurses/curses.h") - else() + endif() + if(NOT DEFINED CURSES_HAVE_NCURSES_CURSES_H) set(CURSES_HAVE_NCURSES_CURSES_H "CURSES_HAVE_NCURSES_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") +if(NOT CURSES_NEED_WIDE) + #ncursesw can't be found for this paths + 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() -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") + 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() endif() ----------------------------------------------------------------------- Summary of changes: Help/release/dev/FindCurses-wide.rst | 5 ++ Modules/FindCurses.cmake | 111 +++++++++++++++++++++++++--------- 2 files changed, 86 insertions(+), 30 deletions(-) create mode 100644 Help/release/dev/FindCurses-wide.rst hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits