Skip to content

Commit ddd3feb

Browse files
[lldb] Add terminfo dependency for ncurses support
For some operating systems (e.g. chromiumos), terminfo is a separate package and library from ncurses. Both are still requirements for curses support in lldb, individually. This is a rebase of this original spack commit: spack/spack@9ea2612 Without this fix, LLDB cannot be built on these systems. Fixes #101368
1 parent 07600f8 commit ddd3feb

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lldb/cmake/modules/FindCursesAndPanel.cmake

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
# FindCursesAndPanel
33
# -----------
44
#
5-
# Find the curses and panel library as a whole.
5+
# Find the curses, terminfo, and panel library as a whole.
6+
# NOTE: terminfo and curses libraries are required separately, as
7+
# some systems do not bundle them together.
68

7-
if(CURSES_INCLUDE_DIRS AND CURSES_LIBRARIES AND PANEL_LIBRARIES)
9+
if(CURSES_INCLUDE_DIRS AND CURSES_LIBRARIES AND TINFO_LIBRARIES AND PANEL_LIBRARIES)
810
set(CURSESANDPANEL_FOUND TRUE)
911
else()
1012
find_package(Curses QUIET)
13+
find_package(TINFO_LIBRARIES NAMES tinfo DOC "The curses tinfo library" QUIET)
1114
find_library(PANEL_LIBRARIES NAMES panel DOC "The curses panel library" QUIET)
1215
include(FindPackageHandleStandardArgs)
1316
find_package_handle_standard_args(CursesAndPanel
@@ -16,9 +19,10 @@ else()
1619
REQUIRED_VARS
1720
CURSES_INCLUDE_DIRS
1821
CURSES_LIBRARIES
22+
TINFO_LIBRARIES
1923
PANEL_LIBRARIES)
20-
if(CURSES_FOUND AND PANEL_LIBRARIES)
21-
mark_as_advanced(CURSES_INCLUDE_DIRS CURSES_LIBRARIES PANEL_LIBRARIES)
24+
if(CURSES_FOUND AND TINFO_LIBRARIES AND PANEL_LIBRARIES)
25+
mark_as_advanced(CURSES_INCLUDE_DIRS CURSES_LIBRARIES TINFO_LIBRARIES PANEL_LIBRARIES)
2226
endif()
2327
endif()
2428

0 commit comments

Comments
 (0)