From 67d1d80f94107e26585d192d194295180cb9f73b Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Tue, 16 May 2023 22:02:11 +0200 Subject: [PATCH] When using curses, look for libterminfo as well. (#9794) Supports NetBSD, where libtinfo isn't available but libterminfo is. --- cmake/ConfigureChecks.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index b2b47c0d3..59f9b5a5a 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -79,6 +79,12 @@ list(APPEND CMAKE_REQUIRED_INCLUDES ${CURSES_INCLUDE_DIRS}) find_library(CURSES_TINFO tinfo) if (CURSES_TINFO) set(CURSES_LIBRARY ${CURSES_LIBRARY} ${CURSES_TINFO}) +else() + # on NetBSD, libtinfo has a longer name (libterminfo) + find_library(CURSES_TINFO terminfo) + if (CURSES_TINFO) + set(CURSES_LIBRARY ${CURSES_LIBRARY} ${CURSES_TINFO}) + endif() endif() # Get threads.