From ccd2d34160507015216036f3c23c804c17ef1fc5 Mon Sep 17 00:00:00 2001
From: Peter Wu <peter@lekensteyn.nl>
Date: Thu, 11 Feb 2016 23:27:31 +0100
Subject: [PATCH] cmake: Install headers

---
 CMakeLists.txt              | 4 ++++
 lib/CMakeLists.txt          | 3 ++-
 lib/includes/CMakeLists.txt | 4 ++++
 3 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 lib/includes/CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f4c20a6..35da5f5d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -504,6 +504,10 @@ foreach(name
   configure_file("${name}.in" "${name}" @ONLY)
 endforeach()
 
+include_directories(
+  "${CMAKE_BINARY_DIR}" # for config.h
+)
+
 
 add_subdirectory(lib)
 #add_subdirectory(lib/includes)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index d2dc019c..114749b1 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -1,5 +1,6 @@
+add_subdirectory(includes)
+
 include_directories(
-  "${CMAKE_BINARY_DIR}" # for config.h
   "${CMAKE_CURRENT_SOURCE_DIR}/includes"
   "${CMAKE_CURRENT_BINARY_DIR}/includes"
 )
diff --git a/lib/includes/CMakeLists.txt b/lib/includes/CMakeLists.txt
new file mode 100644
index 00000000..17de2ec6
--- /dev/null
+++ b/lib/includes/CMakeLists.txt
@@ -0,0 +1,4 @@
+install(FILES
+    nghttp2/nghttp2.h
+    "${CMAKE_CURRENT_BINARY_DIR}/nghttp2/nghttp2ver.h"
+  DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/nghttp2")
-- 
2.26.2