diff --git a/App.cpp b/App.cpp index fc05ba4..d471c5d 100644 --- a/App.cpp +++ b/App.cpp @@ -3,8 +3,8 @@ */ #include "App.hpp" -#include "Window.hpp" #include "Debug.hpp" +#include #include #include diff --git a/CMakeLists.txt b/CMakeLists.txt index e44d355..ec101bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/SingleUserInput.cpp b/SingleUserInput.cpp index 5a0ff7b..ec01285 100644 --- a/SingleUserInput.cpp +++ b/SingleUserInput.cpp @@ -2,7 +2,7 @@ * @author Christian Burger (christian@krikkel.de) */ -#include "SingleUserInput.hpp" +#include #include "Debug.hpp" #include diff --git a/Window.cpp b/Window.cpp index 40eabaa..13ea035 100644 --- a/Window.cpp +++ b/Window.cpp @@ -2,7 +2,7 @@ * @author Christian Burger (christian@krikkel.de) */ -#include "Window.hpp" +#include #include "Debug.hpp" #include diff --git a/SingleUserInput.hpp b/include/NCursesPtyWindow/SingleUserInput.hpp similarity index 100% rename from SingleUserInput.hpp rename to include/NCursesPtyWindow/SingleUserInput.hpp diff --git a/Window.hpp b/include/NCursesPtyWindow/Window.hpp similarity index 100% rename from Window.hpp rename to include/NCursesPtyWindow/Window.hpp