[msitools: 1/2] include: install libmsi header files




commit b627ec5603871ce25e08b33a8489fd05b3f5f616
Author: Daniel P. Berrangé <berrange redhat com>
Date:   Tue Feb 2 14:31:02 2021 +0000

    include: install libmsi header files
    
    Signed-off-by: Daniel P. Berrangé <berrange redhat com>

 include/meson.build | 17 +++++++++++++----
 meson.build         |  3 +++
 2 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/include/meson.build b/include/meson.build
index 6af5cb7..7f34a89 100644
--- a/include/meson.build
+++ b/include/meson.build
@@ -1,17 +1,26 @@
 libmsi_types_h = files('libmsi-types.h')
 
+libmsi_includedir = join_paths(includedir, 'libmsi-1.0')
+
 libmsi_enums_h = gnome.mkenums('libmsi-enums',
   h_template: 'libmsi-enums.h.etemplate',
   sources: libmsi_types_h,
+  install_header: true,
+  install_dir: libmsi_includedir,
 )
 
-introspectable_headers = files(
+libmsi_headers = files(
   'libmsi-database.h',
   'libmsi-query.h',
   'libmsi-record.h',
   'libmsi-summary-info.h',
   'libmsi-types.h',
   'libmsi.h',
-) + [
-  libmsi_enums_h,
-]
+)
+
+introspectable_headers = libmsi_headers + [libmsi_enums_h]
+
+install_data(
+  libmsi_headers,
+  install_dir: libmsi_includedir,
+)
diff --git a/meson.build b/meson.build
index edc1835..767ba7f 100644
--- a/meson.build
+++ b/meson.build
@@ -31,6 +31,9 @@ config_h = configure_file(
   configuration: config,
 )
 
+prefix = get_option('prefix')
+includedir = join_paths(prefix, get_option('includedir'))
+
 inc_dirs = include_directories('.', 'include')
 
 subdir('completion')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]