2022-04-22 14:39:00 +02:00
|
|
|
##
|
|
|
|
# @brief Includes the UTF-8 C++ version of the `ncurses` library.
|
2022-04-13 13:10:55 +02:00
|
|
|
# @author Christian Burger <christian@krikkel.de>
|
|
|
|
|
2022-04-03 10:16:20 +02:00
|
|
|
set(CURSES_NEED_NCURSES TRUE)
|
|
|
|
set(CURSES_NEED_WIDE TRUE)
|
|
|
|
find_package(Curses 6.2 REQUIRED)
|
2022-04-18 12:43:26 +02:00
|
|
|
include_directories(SYSTEM ${CURSES_INCLUDE_DIRS})
|
2022-04-03 10:16:20 +02:00
|
|
|
|
|
|
|
# find C++ interface for ncurses with unicode support
|
2022-04-23 20:34:00 +02:00
|
|
|
find_library(CURSES_CPP_WIDE_LIBRARY NAMES ncurses++w)
|
2022-04-03 10:16:20 +02:00
|
|
|
if(NOT CURSES_CPP_WIDE_LIBRARY)
|
2022-04-23 20:34:00 +02:00
|
|
|
message(SEND_ERROR "C++ interface for ncurses (wide/unicode) not found.")
|
2022-04-03 10:16:20 +02:00
|
|
|
endif()
|
|
|
|
list(APPEND CURSES_LIBRARIES ${CURSES_CPP_WIDE_LIBRARY})
|