summaryrefslogtreecommitdiffstats
path: root/src/arrow/c_glib/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:54:28 +0000
commite6918187568dbd01842d8d1d2c808ce16a894239 (patch)
tree64f88b554b444a49f656b6c656111a145cbbaa28 /src/arrow/c_glib/meson.build
parentInitial commit. (diff)
downloadceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz
ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/arrow/c_glib/meson.build')
-rw-r--r--src/arrow/c_glib/meson.build191
1 files changed, 191 insertions, 0 deletions
diff --git a/src/arrow/c_glib/meson.build b/src/arrow/c_glib/meson.build
new file mode 100644
index 000000000..df04cf0a0
--- /dev/null
+++ b/src/arrow/c_glib/meson.build
@@ -0,0 +1,191 @@
+# -*- indent-tabs-mode: nil -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+project('arrow-glib', 'c', 'cpp',
+ license: 'Apache-2.0',
+ default_options: [
+ 'cpp_std=c++11',
+ ])
+
+version = '6.0.1'
+if version.endswith('-SNAPSHOT')
+ version_numbers = version.split('-')[0].split('.')
+ version_tag = version.split('-')[1]
+else
+ version_numbers = version.split('.')
+ version_tag = ''
+endif
+version_major = version_numbers[0].to_int()
+version_minor = version_numbers[1].to_int()
+version_micro = version_numbers[2].to_int()
+
+api_version = '1.0'
+so_version = version_major * 100 + version_minor
+so_version_patch = version_micro
+library_version = '@0@.@1@.@2@'.format(so_version, so_version_patch, 0)
+
+prefix = get_option('prefix')
+include_dir = join_paths(prefix, get_option('includedir'))
+data_dir = join_paths(prefix, get_option('datadir'))
+
+gnome = import('gnome')
+pkgconfig = import('pkgconfig')
+
+base_include_directories = [
+ include_directories('.')
+]
+
+have_gi = dependency('gobject-introspection-1.0', required: false).found()
+
+arrow_cpp_build_dir = get_option('arrow_cpp_build_dir')
+arrow_cpp_build_type = get_option('arrow_cpp_build_type')
+if arrow_cpp_build_dir == ''
+ arrow_cpp_build_lib_dir = ''
+else
+ arrow_cpp_build_lib_dir = join_paths(meson.source_root(),
+ arrow_cpp_build_dir,
+ arrow_cpp_build_type.to_lower())
+endif
+
+if arrow_cpp_build_lib_dir == ''
+ arrow = dependency('arrow')
+ # They are just for checking required modules are enabled. They are built into
+ # libarrow.so. So we don't need additional build flags for them.
+ dependency('arrow-compute')
+ dependency('arrow-csv')
+ dependency('arrow-filesystem')
+ dependency('arrow-json')
+
+ have_arrow_orc = dependency('arrow-orc', required: false).found()
+ arrow_cuda = dependency('arrow-cuda', required: false)
+ arrow_dataset = dependency('arrow-dataset', required: false)
+ arrow_flight = dependency('arrow-flight', required: false)
+ gandiva = dependency('gandiva', required: false)
+ parquet = dependency('parquet', required: false)
+ plasma = dependency('plasma', required: false)
+else
+ base_include_directories += [
+ include_directories(join_paths(arrow_cpp_build_dir, 'src')),
+ include_directories('../cpp/src'),
+ ]
+ cpp_compiler = meson.get_compiler('cpp')
+ arrow = cpp_compiler.find_library('arrow',
+ dirs: [arrow_cpp_build_lib_dir])
+ arrow_orc_code = '''
+#include <arrow/adapters/orc/adapter.h>
+
+int
+main(void)
+{
+ arrow::adapters::orc::ORCFileReader::Open(nullptr, nullptr, nullptr);
+ return 0;
+}
+ '''
+ have_arrow_orc = cpp_compiler.links(arrow_orc_code,
+ include_directories: base_include_directories,
+ dependencies: [arrow])
+ arrow_cuda = cpp_compiler.find_library('arrow_cuda',
+ dirs: [arrow_cpp_build_lib_dir],
+ required: false)
+ arrow_dataset = cpp_compiler.find_library('arrow_dataset',
+ dirs: [arrow_cpp_build_lib_dir],
+ required: false)
+ arrow_flight = cpp_compiler.find_library('arrow_flight',
+ dirs: [arrow_cpp_build_lib_dir],
+ required: false)
+ gandiva = cpp_compiler.find_library('gandiva',
+ dirs: [arrow_cpp_build_lib_dir],
+ required: false)
+ parquet = cpp_compiler.find_library('parquet',
+ dirs: [arrow_cpp_build_lib_dir],
+ required: false)
+ plasma = cpp_compiler.find_library('plasma',
+ dirs: [arrow_cpp_build_lib_dir],
+ required: false)
+endif
+
+cxx = meson.get_compiler('cpp')
+cxx_flags = []
+if get_option('development_mode')
+ if cxx.get_id() == 'msvc'
+ cxx_flags += ['/WX']
+ else
+ cxx_flags += ['-Werror']
+ endif
+endif
+if cxx.get_id() != 'msvc'
+ cxx_flags += ['-Wmissing-declarations']
+endif
+add_project_arguments(cxx.get_supported_arguments(cxx_flags), language: 'cpp')
+
+subdir('arrow-glib')
+if arrow_cuda.found()
+ subdir('arrow-cuda-glib')
+endif
+if arrow_dataset.found()
+ subdir('arrow-dataset-glib')
+endif
+if arrow_flight.found()
+ subdir('arrow-flight-glib')
+endif
+if gandiva.found()
+ subdir('gandiva-glib')
+endif
+if parquet.found()
+ subdir('parquet-glib')
+endif
+if plasma.found()
+ subdir('plasma-glib')
+endif
+subdir('example')
+
+if get_option('gtk_doc')
+ subdir('doc/arrow-glib')
+ if arrow_dataset.found()
+ subdir('doc/arrow-dataset-glib')
+ endif
+ if arrow_flight.found()
+ subdir('doc/arrow-flight-glib')
+ endif
+ if gandiva.found()
+ subdir('doc/gandiva-glib')
+ endif
+ if parquet.found()
+ subdir('doc/parquet-glib')
+ endif
+ if plasma.found()
+ subdir('doc/plasma-glib')
+ endif
+endif
+
+install_data('../LICENSE.txt',
+ 'README.md',
+ install_dir: join_paths(data_dir, 'doc', meson.project_name()))
+
+run_test = find_program('test/run-test.sh')
+test('unit test',
+ run_test,
+ env: [
+ 'ARROW_GLIB_TYPELIB_DIR=@0@/arrow-glib'.format(meson.build_root()),
+ 'ARROW_CUDA_GLIB_TYPELIB_DIR=@0@/arrow-cuda-glib'.format(meson.build_root()),
+ 'ARROW_DATASET_GLIB_TYPELIB_DIR=@0@/arrow-dataset-glib'.format(meson.build_root()),
+ 'GANDIVA_GLIB_TYPELIB_DIR=@0@/gandiva-glib'.format(meson.build_root()),
+ 'PARQUET_GLIB_TYPELIB_DIR=@0@/parquet-glib'.format(meson.build_root()),
+ 'PLASMA_GLIB_TYPELIB_DIR=@0@/plasma-glib'.format(meson.build_root()),
+ ])