kNCurses/CMakeLists.txt
Christian Burger f1d0c012b7 fixing debug facility in when NDEBUG is set
- changed libvterm.cmake so it is easier to integrate in other projects
2022-04-14 09:31:19 +02:00

40 lines
999 B
CMake

# @author Christian Burger <christian@krikkel.de>
cmake_minimum_required(VERSION 3.16.3)
project(NCursesPtyWindow VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)
include(CTest)
enable_testing()
include(ExternalProject)
include("cmake/ncurses.cmake")
include("cmake/gsl.cmake")
add_library(NCursesPtyWindow Window.cpp SingleUserInput.cpp Debug.cpp)
### libraries
include("cmake/libvterm.cmake")
if(EXISTS libvtermProject)
add_dependencies(NCursesPtyWindow libvtermProject)
endif()
find_library(UTIL_LIBRARY util)
target_link_libraries(NCursesPtyWindow ${CURSES_LIBRARIES} ${LIBVTERM_LIBRARY} ${UTIL_LIBRARY})
### threads
set(THREADS_PREFER_PTHREAD_FLAG true)
find_package(Threads REQUIRED)
target_link_libraries(NCursesPtyWindow Threads::Threads)
### demo application
add_executable(NCursesPtyApp main.cpp App.cpp)
target_link_libraries(NCursesPtyApp ${CURSES_LIBRARIES} NCursesPtyWindow)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)