blob: fbe27e455acb5c5a5a6d204291b399f32227c68f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3537c27..bf569a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,7 +46,8 @@ target_sources(qcbor
target_include_directories(qcbor
PUBLIC
- inc
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/qcbor>
PRIVATE
src
)
@@ -90,8 +91,13 @@ set_target_properties(
include(GNUInstallDirs)
install(
TARGETS qcbor
+ EXPORT unofficial-qcbor-targets
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qcbor"
)
+install(EXPORT unofficial-qcbor-targets
+ FILE unofficial-qcbor-config.cmake
+ NAMESPACE unofficial::qcbor::
+ DESTINATION share/unofficial-qcbor)
if (NOT BUILD_QCBOR_TEST STREQUAL "OFF")
enable_testing()
|