From 4b709c92fb9358b55d8d77d1f51343cad7526fbf Mon Sep 17 00:00:00 2001 From: Christian Burger Date: Sat, 21 May 2022 00:05:07 +0200 Subject: [PATCH] fixing problem with packaging Multiline strings are problematic in cmake. --- CMakeLists.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c93e51..7471506 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,15 +45,16 @@ add_executable(kNCursesDemoApp main.cpp DemoApp.cpp) target_link_libraries(kNCursesDemoApp kNCurses) ### installation and packaging -set(NCURSES_SYSTEM_INCLUDE "include/kNCurses") +set(KNCURSES_SYSTEM_INCLUDE "include/kNCurses") +string(CONCAT KNCURSES_PUBLIC_HEADERS "${KNCURSES_SYSTEM_INCLUDE}/Window.hpp;" + "${KNCURSES_SYSTEM_INCLUDE}/SingleUserInput.hpp;" + "${KNCURSES_SYSTEM_INCLUDE}/PtyWindow.hpp;" + "${KNCURSES_SYSTEM_INCLUDE}/TilingWindowManager.hpp;" + "${KNCURSES_SYSTEM_INCLUDE}/VerticalTilingWindowManager.hpp;" + "${KNCURSES_SYSTEM_INCLUDE}/HorizontalTilingWindowManager.hpp;" + ) set_target_properties(kNCurses PROPERTIES - PUBLIC_HEADER "${NCURSES_SYSTEM_INCLUDE}/Window.hpp; - ${NCURSES_SYSTEM_INCLUDE}/SingleUserInput.hpp; - ${NCURSES_SYSTEM_INCLUDE}/PtyWindow.hpp; - ${NCURSES_SYSTEM_INCLUDE}/TilingWindowManager.hpp; - ${NCURSES_SYSTEM_INCLUDE}/VerticalTilingWindowManager.hpp; - ${NCURSES_SYSTEM_INCLUDE}/HorizontalTilingWindowManager.hpp; - " + PUBLIC_HEADER "${KNCURSES_PUBLIC_HEADERS}" VERSION "${CMAKE_PROJECT_VERSION}") include(GNUInstallDirs) install(TARGETS kNCurses ARCHIVE