kNCurses/cmake/ncurses.cmake
Christian Burger ae6130f095 cmake: some improvements
* not depending on "-dev" packages for the built Debian package
* some refactoring in if-clauses and with "quotes"
* libvterm dependency: if something is missing, made clear what
2022-04-23 22:24:08 +02:00

15 lines
546 B
CMake

##
# @brief Includes the UTF-8 C++ version of the `ncurses` library.
# @author Christian Burger <christian@krikkel.de>
set(CURSES_NEED_NCURSES TRUE)
set(CURSES_NEED_WIDE TRUE)
find_package(Curses 6.2 REQUIRED)
include_directories(SYSTEM ${CURSES_INCLUDE_DIRS})
# find C++ interface for ncurses with unicode support
find_library(CURSES_CPP_WIDE_LIBRARY NAMES ncurses++w)
if(NOT CURSES_CPP_WIDE_LIBRARY)
message(SEND_ERROR "C++ interface for ncurses (wide/unicode) not found.")
endif()
list(APPEND CURSES_LIBRARIES ${CURSES_CPP_WIDE_LIBRARY})