Skip to content

Commit 4187559

Browse files
[lldb] Add terminfo dependency for ncurses support
For ChromiumOS, terminfo is separate from the ncurses shared libraries. We need to explicitly look for libtinfo, and add that as a dependency. Original patch from: spack/spack@9ea2612 patch.cherry: false patch.platforms: chromiumos patch.version_range.from: 537678 patch.version_range.until: null Change-Id: I2201cdef0a1209f73ecee3de1836c5eeaefc5d36
1 parent 8a71897 commit 4187559

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: This is patched due to a terminfo dependency error introduced in
7+
# https://github.com/llvm/llvm-project/pull/92865
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)