kNCurses/CMakeLists.txt

32 lines
806 B
CMake

cmake_minimum_required(VERSION 3.16.3)
project(NCursesPty VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)
include(CTest)
enable_testing()
include("cmake/ncurses.cmake")
include("cmake/gsl.cmake")
### libraries
find_library(LIBVTERM_LIBRARY vterm)
find_library(UTIL_LIBRARY util)
add_library(NCursesPty NCursesPtyWindow.cpp Debug.cpp)
target_link_libraries(NCursesPty ${CURSES_LIBRARIES} ${LIBVTERM_LIBRARY} ${UTIL_LIBRARY})
### threads
set(THREADS_PREFER_PTHREAD_FLAG true)
find_package(Threads REQUIRED)
target_link_libraries(NCursesPty Threads::Threads)
### demo application
add_executable(NCursesPtyApp main.cpp NCursesPtyApp.cpp)
target_link_libraries(NCursesPtyApp ${CURSES_LIBRARIES} NCursesPty)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)