Skip to content

Commit

Permalink
Add CMake header install config
Browse files Browse the repository at this point in the history
Closes #172
  • Loading branch information
BrianSipos authored May 30, 2024
1 parent b239c65 commit 3e0bdc5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 3e0bdc5

Please sign in to comment.