mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-24 15:38:54 -06:00
FindCurses: use tinfow when wide support is requested
This commit is contained in:
committed by
Brad King
parent
9150c818b7
commit
9fc87ef2e7
@@ -134,11 +134,13 @@ if(CURSES_USE_NCURSES)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (CURSES_NEED_WIDE)
|
if (CURSES_NEED_WIDE)
|
||||||
|
set(CURSES_TINFO_LIBRARY_NAME tinfow)
|
||||||
find_path(CURSES_INCLUDE_PATH
|
find_path(CURSES_INCLUDE_PATH
|
||||||
NAMES ncursesw/ncurses.h ncursesw/curses.h ncursesw.h cursesw.h
|
NAMES ncursesw/ncurses.h ncursesw/curses.h ncursesw.h cursesw.h
|
||||||
HINTS "${_cursesParentDir}/include"
|
HINTS "${_cursesParentDir}/include"
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
|
set(CURSES_TINFO_LIBRARY_NAME tinfo)
|
||||||
find_path(CURSES_INCLUDE_PATH
|
find_path(CURSES_INCLUDE_PATH
|
||||||
NAMES ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h
|
NAMES ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h
|
||||||
HINTS "${_cursesParentDir}/include"
|
HINTS "${_cursesParentDir}/include"
|
||||||
@@ -153,8 +155,8 @@ if(CURSES_USE_NCURSES)
|
|||||||
CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}"
|
CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}"
|
||||||
cbreak "" CURSES_NCURSES_HAS_CBREAK)
|
cbreak "" CURSES_NCURSES_HAS_CBREAK)
|
||||||
if(NOT CURSES_NCURSES_HAS_CBREAK)
|
if(NOT CURSES_NCURSES_HAS_CBREAK)
|
||||||
find_library(CURSES_EXTRA_LIBRARY tinfo HINTS "${_cursesLibDir}")
|
find_library(CURSES_EXTRA_LIBRARY "${CURSES_TINFO_LIBRARY_NAME}" HINTS "${_cursesLibDir}")
|
||||||
find_library(CURSES_EXTRA_LIBRARY tinfo )
|
find_library(CURSES_EXTRA_LIBRARY "${CURSES_TINFO_LIBRARY_NAME}" )
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
get_filename_component(_cursesLibDir "${CURSES_CURSES_LIBRARY}" PATH)
|
get_filename_component(_cursesLibDir "${CURSES_CURSES_LIBRARY}" PATH)
|
||||||
|
|||||||
Reference in New Issue
Block a user