From 3e0bdc5b5d22192b5a6a8ce14269f77cd6b2bdc9 Mon Sep 17 00:00:00 2001 From: Brian Sipos Date: Thu, 30 May 2024 05:40:30 -0400 Subject: [PATCH] Add CMake header install config Closes #172 --- CMakeLists.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 486946ce..e4aa83f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,25 @@ if (CMAKE_C_COMPILER_ID STREQUAL "GNU") ) endif() +set(HEADERS + inc/qcbor/qcbor.h + inc/qcbor/qcbor_common.h + inc/qcbor/qcbor_private.h + inc/qcbor/qcbor_encode.h + inc/qcbor/qcbor_decode.h + inc/qcbor/qcbor_spiffy_decode.h + inc/qcbor/UsefulBuf.h +) +set_target_properties( + qcbor PROPERTIES + PUBLIC_HEADER "${HEADERS}" +) +include(GNUInstallDirs) +install( + TARGETS qcbor + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qcbor" +) + if (NOT BUILD_QCBOR_TEST STREQUAL "OFF") add_subdirectory(test) endif()