From 68663ebb150a41248e12a461dd5b699f63566048 Mon Sep 17 00:00:00 2001 From: Slava Barinov Date: Thu, 19 Dec 2019 17:40:49 +0300 Subject: Add tinfo to curses Signed-off-by: Slava Barinov --- Modules/FindCurses.cmake | 8 ++++++++ Source/CursesDialog/form/CMakeLists.txt | 3 +++ 2 files changed, 11 insertions(+) diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake index 09d1ba401..81fb7575a 100644 --- a/Modules/FindCurses.cmake +++ b/Modules/FindCurses.cmake @@ -133,6 +133,9 @@ find_library(CURSES_EXTRA_LIBRARY cur_colr ) find_library(CURSES_FORM_LIBRARY form HINTS "${_cursesLibDir}") find_library(CURSES_FORM_LIBRARY form ) +find_library(CURSES_TINFO_LIBRARY tinfo HINTS "${_cursesLibDir}") +find_library(CURSES_TINFO_LIBRARY tinfo ) + # for compatibility with older FindCurses.cmake this has to be in the cache # FORCE must not be used since this would break builds which preload a cache # qith these variables set @@ -150,6 +153,10 @@ if(CURSES_FORM_LIBRARY) set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_FORM_LIBRARY}) endif() +if(CURSES_TINFO_LIBRARY) + set(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_TINFO_LIBRARY}) +endif() + # Proper name is *_INCLUDE_DIR set(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH}) @@ -168,6 +175,7 @@ mark_as_advanced( CURSES_NCURSES_LIBRARY CURSES_EXTRA_LIBRARY FORM_LIBRARY + CURSES_TINFO_LIBRARY CURSES_LIBRARIES CURSES_INCLUDE_DIR CURSES_CURSES_HAS_WSYNCUP diff --git a/Source/CursesDialog/form/CMakeLists.txt b/Source/CursesDialog/form/CMakeLists.txt index 4e07fa0ff..e9cf30a77 100644 --- a/Source/CursesDialog/form/CMakeLists.txt +++ b/Source/CursesDialog/form/CMakeLists.txt @@ -64,3 +64,6 @@ target_link_libraries(cmForm ${CURSES_LIBRARY}) if(CURSES_EXTRA_LIBRARY) target_link_libraries(cmForm ${CURSES_EXTRA_LIBRARY}) endif() +if(CURSES_TINFO_LIBRARY) + target_link_libraries(cmForm ${CURSES_TINFO_LIBRARY}) +endif() -- cgit v1.2.3