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()
