This is an automated email from the ASF dual-hosted git repository.

paleolimbot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-nanoarrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 61dc7438 fix: Meson install header files and pkgconfig (#542)
61dc7438 is described below

commit 61dc7438b88ab8761d18e1362134842974dc670d
Author: William Ayd <[email protected]>
AuthorDate: Tue Jun 25 13:58:33 2024 -0400

    fix: Meson install header files and pkgconfig (#542)
---
 CMakeLists.txt            |  3 +--
 meson.build               | 27 +++++++++++++++++++++++++++
 src/nanoarrow/meson.build | 10 +++++++---
 3 files changed, 35 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6efbfa65..601d511e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -236,8 +236,7 @@ if(NANOARROW_IPC)
                                     $<INSTALL_INTERFACE:include>)
 
   install(TARGETS nanoarrow_ipc DESTINATION lib)
-  install(FILES src/nanoarrow/nanoarrow_ipc.h
-                src/nanoarrow/nanoarrow_ipc_flatcc_generated.h
+  install(FILES src/nanoarrow/nanoarrow_ipc.h 
src/nanoarrow/ipc/flatcc_generated.h
           DESTINATION include/nanoarrow)
 endif()
 
diff --git a/meson.build b/meson.build
index 73c44c5b..42179610 100644
--- a/meson.build
+++ b/meson.build
@@ -43,6 +43,19 @@ endif
 subdir('src/nanoarrow')
 incdir = include_directories('src/')
 
+install_headers(
+    'src/nanoarrow/nanoarrow.h',
+    'src/nanoarrow/nanoarrow.hpp',
+    subdir: 'nanoarrow',
+)
+
+install_headers(
+    'src/nanoarrow/common/inline_array.h',
+    'src/nanoarrow/common/inline_buffer.h',
+    'src/nanoarrow/common/inline_types.h',
+    subdir: 'nanoarrow/common',
+)
+
 nanoarrow_lib = library(
     'nanoarrow',
     'src/nanoarrow/common/array.c',
@@ -60,6 +73,12 @@ nanoarrow_dep = declare_dependency(include_directories: 
[incdir],
 if get_option('ipc')
     flatcc_dep = dependency('flatcc')
 
+    install_headers(
+        'src/nanoarrow/nanoarrow_ipc.h',
+        'src/nanoarrow/ipc/flatcc_generated.h',
+        subdir: 'nanoarrow'
+    )
+
     nanoarrow_ipc_lib = library(
         'nanoarrow_ipc',
         'src/nanoarrow/ipc/decoder.c',
@@ -91,6 +110,11 @@ if needs_device
     error('CUDA support with the Meson build system is not implemented')
   endif
 
+  install_headers(
+      'src/nanoarrow/nanoarrow_device.h',
+      subdir: 'nanoarrow',
+  )
+
   nanoarrow_device_lib = library(
       'nanoarrow_device',
       sources: device_srcs,
@@ -250,3 +274,6 @@ if get_option('apps')
   )
   endif
 endif
+
+pkg = import('pkgconfig')
+pkg.generate(nanoarrow_lib)
diff --git a/src/nanoarrow/meson.build b/src/nanoarrow/meson.build
index 3837af86..2a3fbf40 100644
--- a/src/nanoarrow/meson.build
+++ b/src/nanoarrow/meson.build
@@ -35,6 +35,10 @@ conf_data.set('NANOARROW_VERSION_MAJOR', ver_major)
 conf_data.set('NANOARROW_VERSION_MINOR', ver_minor)
 conf_data.set('NANOARROW_VERSION_PATCH', ver_patch)
 
-configure_file(input: 'nanoarrow_config.h.in',
-               output: 'nanoarrow_config.h',
-               configuration: conf_data)
+configure_file(
+    input: 'nanoarrow_config.h.in',
+    output: 'nanoarrow_config.h',
+    configuration: conf_data,
+    install: true,
+    install_dir: get_option('includedir') / 'nanoarrow',
+)

Reply via email to