moved library system headers to separate folder

Gave the library a version in case it is build statically.
master
Christian Burger 2022-04-23 20:27:55 +02:00
parent 2d7dda88c5
commit f994cb2261
6 changed files with 11 additions and 5 deletions

View File

@ -3,8 +3,8 @@
*/
#include "App.hpp"
#include "Window.hpp"
#include "Debug.hpp"
#include <NCursesPtyWindow/Window.hpp>
#include <unistd.h>
#include <utmp.h>

View File

@ -15,6 +15,9 @@ enable_testing()
add_library(NCursesPtyWindow Window.cpp SingleUserInput.cpp Debug.cpp)
### path to own system includes
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/include")
### libraries
include("cmake/ncurses.cmake")
@ -40,9 +43,12 @@ add_executable(NCursesPtyApp main.cpp App.cpp)
target_link_libraries(NCursesPtyApp NCursesPtyWindow)
### installation and packaging
set_target_properties(NCursesPtyWindow PROPERTIES PUBLIC_HEADER "Window.hpp;SingleUserInput.hpp"
set(NCURSES_PTY_WINDOW_SYSTEM_INCLUDE "include/NCursesPtyWindow")
set_target_properties(NCursesPtyWindow PROPERTIES PUBLIC_HEADER "${NCURSES_PTY_WINDOW_SYSTEM_INCLUDE}/Window.hpp;${NCURSES_PTY_WINDOW_SYSTEM_INCLUDE}/SingleUserInput.hpp"
VERSION "${CMAKE_PROJECT_VERSION}")
install(TARGETS NCursesPtyWindow ARCHIVE PUBLIC_HEADER)
include(GNUInstallDirs)
install(TARGETS NCursesPtyWindow ARCHIVE
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/NCursesPtyWindow/")
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})

View File

@ -2,7 +2,7 @@
* @author Christian Burger (christian@krikkel.de)
*/
#include "SingleUserInput.hpp"
#include <NCursesPtyWindow/SingleUserInput.hpp>
#include "Debug.hpp"
#include <vterm.h>

View File

@ -2,7 +2,7 @@
* @author Christian Burger (christian@krikkel.de)
*/
#include "Window.hpp"
#include <NCursesPtyWindow/Window.hpp>
#include "Debug.hpp"
#include <cstdio>