Blob Blame History Raw
From 0b34ccb9a3b26cd1c5267c6a5c15e9fa1a665adb Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@cryptomilk.org>
Date: Wed, 2 Jan 2019 10:59:30 +0100
Subject: [PATCH 65/70] cmake: Install header files without globbing

Fixes #627

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
---
 CMakeLists.txt               |  1 +
 include/CMakeLists.txt       |  1 +
 include/exiv2/CMakeLists.txt | 51 ++++++++++++++++++++++++++++++++++++
 src/CMakeLists.txt           |  4 ---
 4 files changed, 53 insertions(+), 4 deletions(-)
 create mode 100644 include/CMakeLists.txt
 create mode 100644 include/exiv2/CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 183cdd2e..ce4d2202 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,6 +76,7 @@ endif()
 
 include(cmake/compilerFlagsExiv2.cmake REQUIRED)
 
+add_subdirectory( include )
 add_subdirectory( src )
 
 if( EXIV2_BUILD_UNIT_TESTS )
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
new file mode 100644
index 00000000..01b43a6c
--- /dev/null
+++ b/include/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory(exiv2)
diff --git a/include/exiv2/CMakeLists.txt b/include/exiv2/CMakeLists.txt
new file mode 100644
index 00000000..60080f1c
--- /dev/null
+++ b/include/exiv2/CMakeLists.txt
@@ -0,0 +1,51 @@
+install(FILES
+            asfvideo.hpp
+            basicio.hpp
+            bigtiffimage.hpp
+            bmpimage.hpp
+            config.h
+            convert.hpp
+            cr2image.hpp
+            crwimage.hpp
+            datasets.hpp
+            easyaccess.hpp
+            epsimage.hpp
+            error.hpp
+            exif.hpp
+            exiv2.hpp
+            futils.hpp
+            gifimage.hpp
+            http.hpp
+            image.hpp
+            ini.hpp
+            iptc.hpp
+            jp2image.hpp
+            jpgimage.hpp
+            matroskavideo.hpp
+            metadatum.hpp
+            mrwimage.hpp
+            orfimage.hpp
+            pgfimage.hpp
+            pngimage.hpp
+            preview.hpp
+            properties.hpp
+            psdimage.hpp
+            quicktimevideo.hpp
+            rafimage.hpp
+            riffvideo.hpp
+            rw2image.hpp
+            rwlock.hpp
+            slice.hpp
+            ssh.hpp
+            tags.hpp
+            tgaimage.hpp
+            tiffimage.hpp
+            types.hpp
+            utilsvideo.hpp
+            value.hpp
+            version.hpp
+            webpimage.hpp
+            xmp_exiv2.hpp
+            xmpsidecar.hpp
+        DESTINATION
+            ${CMAKE_INSTALL_INCLUDEDIR}/exiv2)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index adb285b1..04d8a2a0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -225,10 +225,6 @@ install(TARGETS exiv2lib EXPORT exiv2Config
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
 )
 
-install(DIRECTORY ../include/exiv2
-    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
-    FILES_MATCHING PATTERN "*.h*")
-
 install(FILES
     ${CMAKE_BINARY_DIR}/exv_conf.h
     ${CMAKE_BINARY_DIR}/exiv2lib_export.h
-- 
2.17.2