summaryrefslogtreecommitdiffstats
path: root/Modules/FindCurses.cmake
diff options
context:
space:
mode:
authorManuel Herrmann <0@0x17.de>2019-10-12 23:12:33 (GMT)
committerBrad King <brad.king@kitware.com>2019-10-15 13:50:52 (GMT)
commit9fc87ef2e712eda340457811a1e1ac0af3e70bb5 (patch)
treeacd7fd3b294c245e1a327eeca18bbac9bf99944a /Modules/FindCurses.cmake
parent9150c818b7d2afb868575fcb2e0c9ba62b9d7f85 (diff)
downloadCMake-9fc87ef2e712eda340457811a1e1ac0af3e70bb5.zip
CMake-9fc87ef2e712eda340457811a1e1ac0af3e70bb5.tar.gz
CMake-9fc87ef2e712eda340457811a1e1ac0af3e70bb5.tar.bz2
FindCurses: use tinfow when wide support is requested
Diffstat (limited to 'Modules/FindCurses.cmake')
-rw-r--r--Modules/FindCurses.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index 5abc08a..ad40522 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -134,11 +134,13 @@ if(CURSES_USE_NCURSES)
endif()
if (CURSES_NEED_WIDE)
+ set(CURSES_TINFO_LIBRARY_NAME tinfow)
find_path(CURSES_INCLUDE_PATH
NAMES ncursesw/ncurses.h ncursesw/curses.h ncursesw.h cursesw.h
HINTS "${_cursesParentDir}/include"
)
else()
+ set(CURSES_TINFO_LIBRARY_NAME tinfo)
find_path(CURSES_INCLUDE_PATH
NAMES ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h
HINTS "${_cursesParentDir}/include"
@@ -153,8 +155,8 @@ if(CURSES_USE_NCURSES)
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 )
+ find_library(CURSES_EXTRA_LIBRARY "${CURSES_TINFO_LIBRARY_NAME}" HINTS "${_cursesLibDir}")
+ find_library(CURSES_EXTRA_LIBRARY "${CURSES_TINFO_LIBRARY_NAME}" )
endif()
else()
get_filename_component(_cursesLibDir "${CURSES_CURSES_LIBRARY}" PATH)