kNCurses/cmake/ncurses.cmake
Christian Burger 8e71512f12 cmake: locate or build libvterm dependency
There is no version detection. If there is any vterm library, it is
used. If it is the wrong version, there will be an build error.
`libvterm.so.0.0.2` is preferred, which hopefully is compatible to
revision 740 or Ubuntu `libvterm0` version 0.1.2-2.

If no library is found, the correct one is downloaded and build.
2022-04-13 13:10:55 +02:00

14 lines
492 B
CMake

# @author Christian Burger <christian@krikkel.de>
### ncurses
set(CURSES_NEED_NCURSES TRUE)
set(CURSES_NEED_WIDE TRUE)
find_package(Curses 6.2 REQUIRED)
include_directories(${CURSES_INCLUDE_DIRS})
# find C++ interface for ncurses with unicode support
find_library(CURSES_CPP_WIDE_LIBRARY NAMES ncurses++w REQUIRED)
if(NOT CURSES_CPP_WIDE_LIBRARY)
message(FATAL_ERROR "C++ interface for ncurses (wide/unicode) not found.")
endif()
list(APPEND CURSES_LIBRARIES ${CURSES_CPP_WIDE_LIBRARY})