]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/c_glib/gandiva-glib/meson.build
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / c_glib / gandiva-glib / meson.build
1 # -*- indent-tabs-mode: nil -*-
2 #
3 # Licensed to the Apache Software Foundation (ASF) under one
4 # or more contributor license agreements. See the NOTICE file
5 # distributed with this work for additional information
6 # regarding copyright ownership. The ASF licenses this file
7 # to you under the Apache License, Version 2.0 (the
8 # "License"); you may not use this file except in compliance
9 # with the License. You may obtain a copy of the License at
10 #
11 # http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing,
14 # software distributed under the License is distributed on an
15 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 # KIND, either express or implied. See the License for the
17 # specific language governing permissions and limitations
18 # under the License.
19
20 project_name = 'gandiva-glib'
21
22 sources = files(
23 'expression.cpp',
24 'filter.cpp',
25 'function-registry.cpp',
26 'function-signature.cpp',
27 'native-function.cpp',
28 'node.cpp',
29 'projector.cpp',
30 'selection-vector.cpp',
31 )
32
33 c_headers = files(
34 'expression.h',
35 'filter.h',
36 'function-registry.h',
37 'function-signature.h',
38 'gandiva-glib.h',
39 'native-function.h',
40 'node.h',
41 'projector.h',
42 'selection-vector.h',
43 )
44
45 cpp_headers = files(
46 'expression.hpp',
47 'filter.hpp',
48 'function-signature.hpp',
49 'gandiva-glib.hpp',
50 'native-function.hpp',
51 'node.hpp',
52 'projector.hpp',
53 'selection-vector.hpp',
54 )
55
56 version_h_conf = configuration_data()
57 version_h_conf.set('GGANDIVA_VERSION_MAJOR', version_major)
58 version_h_conf.set('GGANDIVA_VERSION_MINOR', version_minor)
59 version_h_conf.set('GGANDIVA_VERSION_MICRO', version_micro)
60 version_h_conf.set('GGANDIVA_VERSION_TAG', version_tag)
61 version_h = configure_file(input: 'version.h.in',
62 output: 'version.h',
63 configuration: version_h_conf)
64 c_headers += version_h
65
66 enums = gnome.mkenums('enums',
67 sources: c_headers,
68 identifier_prefix: 'GGandiva',
69 symbol_prefix: 'ggandiva',
70 c_template: 'enums.c.template',
71 h_template: 'enums.h.template',
72 install_dir: join_paths(include_dir, meson.project_name()),
73 install_header: true)
74 enums_source = enums[0]
75 enums_header = enums[1]
76
77 headers = c_headers + cpp_headers
78 install_headers(headers, subdir: project_name)
79
80 dependencies = [
81 gandiva,
82 arrow_glib,
83 ]
84 libgandiva_glib = library('gandiva-glib',
85 sources: sources + enums,
86 install: true,
87 dependencies: dependencies,
88 include_directories: base_include_directories,
89 soversion: so_version,
90 version: library_version)
91 gandiva_glib = declare_dependency(link_with: libgandiva_glib,
92 include_directories: base_include_directories,
93 dependencies: dependencies,
94 sources: enums_header)
95
96 pkgconfig.generate(libgandiva_glib,
97 filebase: project_name,
98 name: 'Apache Arrow Gandiva GLib',
99 description: 'C API for Apache Arrow Gandiva based on GLib',
100 version: version,
101 requires: ['gandiva', 'arrow-glib'])
102
103 if have_gi
104 gnome.generate_gir(libgandiva_glib,
105 dependencies: declare_dependency(sources: arrow_glib_gir),
106 sources: sources + c_headers + enums,
107 namespace: 'Gandiva',
108 nsversion: api_version,
109 identifier_prefix: 'GGandiva',
110 symbol_prefix: 'ggandiva',
111 export_packages: 'gandiva-glib',
112 includes: [
113 'Arrow-1.0'
114 ],
115 install: true,
116 extra_args: [
117 '--warn-all',
118 '--include-uninstalled=./arrow-glib/Arrow-1.0.gir',
119 ])
120 endif