Update Portuguese translation
[gegl.git] / gegl / meson.build
blob4abb10719d2a7a920ef0723030eaa700a621f0c4
1 gegl_library_build_dir = meson.current_build_dir()
3 geglInclude = include_directories(
4   '.',
5   'buffer',
6   'graph',
7   'module',
8   'opencl',
9   'operation',
10   'process',
11   'property-types',
14 gegl_cflags = [
15   '-DLIBDIR="@0@"'.format(get_option('prefix') / get_option('libdir')),
16   '-DG_LOG_DOMAIN="@0@"'.format('GEGL'),
17   '-DGEGL_LOCALEDIR="@0@"'.format(get_option('localedir')),
18   '-DGEGL_PREFIX="@0@"'.format(get_option('prefix')),
21 gegl_version_h = configure_file(
22   input : 'gegl-version.h.in',
23   output: 'gegl-version.h',
24   configuration: config,
27 gegl_introspectable_headers = files(
28   'gegl.h',
29   'gegl-apply.h',
30   'gegl-enums.h',
31   'gegl-init.h',
32   'gegl-lookup.h',
33   'gegl-matrix.h',
34   'gegl-metadata.h',
35   'gegl-metadatastore.h',
36   'gegl-metadatahash.h',
37   'gegl-operations-util.h',
38   'gegl-parallel.h',
39   'gegl-random.h',
40   'gegl-types.h',
41   'gegl-utils.h',
42 ) + [
43   gegl_version_h,
46 gegl_headers = files(
47   'gegl-cpuaccel.h',
48   'gegl-debug.h',
49   'gegl-op.h',
50   'gegl-math.h',
51   'gegl-plugin.h',
54 gegl_sources = files(
55   'gegl-apply.c',
56   'gegl-config.c',
57   'gegl-cpuaccel.c',
58   'gegl-dot-visitor.c',
59   'gegl-dot.c',
60   'gegl-enums.c',
61   'gegl-gio.c',
62   'gegl-init.c',
63   'gegl-instrument.c',
64   'gegl-introspection-support.c',
65   'gegl-lookup.c',
66   'gegl-matrix.c',
67   'gegl-metadata.c',
68   'gegl-metadatastore.c',
69   'gegl-metadatahash.c',
70   'gegl-parallel.c',
71   'gegl-random.c',
72   'gegl-serialize.c',
73   'gegl-stats.c',
74   'gegl-utils.c',
75   'gegl-xml.c',
78 subdir('buffer')
79 subdir('graph')
80 subdir('module')
81 subdir('opencl')
82 subdir('operation')
83 subdir('process')
84 subdir('property-types')
86 gegl_headers += gegl_introspectable_headers
88 install_headers(gegl_headers,
89   subdir: api_name
92 gegl_ldflags = os_osx ? ['-framework', 'OpenCL'] : []
94 opencl_dep = declare_dependency(
95   sources : [opencl_headers],
99 if host_cpu_family == 'x86_64'
100   simd_extra = [lib_gegl_x86_64_v2, lib_gegl_x86_64_v3]
101 elif host_cpu_family == 'arm'
102   simd_extra = [lib_gegl_arm_neon]
103 else
104   simd_extra = []
105 endif
107 gegl_lib = library(api_name,
108   gegl_sources,
109   include_directories: [rootInclude, geglInclude],
110   dependencies: [
111     babl,
112     glib,
113     gio,
114     math,
115     gmodule,
116     opencl_dep,
117   ],
118   c_args: gegl_cflags,
120   link_with: simd_extra,
121   link_args: gegl_ldflags,
122   install: true,
123   version: so_version,
127 if g_ir.found()
128   introspection_sources = gegl_introspectable_headers + files(
129     'gegl-introspection-support.h',
130     'opencl' / 'gegl-cl-introspection-support.h',
131   )
133   if meson.version().version_compare('>=1.2')
134     gegl_gir = gnome.generate_gir(gegl_lib,
135       sources: introspection_sources,
136       nsversion: api_version,
137       namespace: 'Gegl',
138       identifier_prefix: 'Gegl',
139       symbol_prefix: 'gegl',
140       header: 'gegl.h',
141       includes: [ 'GLib-2.0', 'GObject-2.0', 'Babl-0.1' ],
142       dependencies: [babl],
143       export_packages: 'gegl-' + api_version,
144       install: true,
145       env: ['GEGL_BUILD=1'],
146     )
147   else
148     gegl_gir = gnome.generate_gir(gegl_lib,
149       sources: introspection_sources,
150       nsversion: api_version,
151       namespace: 'Gegl',
152       identifier_prefix: 'Gegl',
153       symbol_prefix: 'gegl',
154       header: 'gegl.h',
155       includes: [ 'GLib-2.0', 'GObject-2.0', 'Babl-0.1' ],
156       dependencies: [babl],
157       export_packages: 'gegl-' + api_version,
158       install: true,
159     )
160   endif
162   if vapigen.found()
163     configure_file(
164       input: 'Gegl.metadata.in',
165       output: 'Gegl-@0@.metadata'.format(api_version),
166       copy: true,
167     )
169     gnome.generate_vapi(api_name,
170       metadata_dirs: meson.current_source_dir(),
171       sources: gegl_gir[0],
172       install: true,
173       packages: [
174         'glib-2.0',
175         'gobject-2.0',
176         'babl-0.1'
177       ],
178     )
179   endif
180 endif