-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmeson.build
77 lines (61 loc) · 1.91 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
project(
'gexiv2',
['c', 'cpp'],
version : '0.15.0',
license: 'GPL-2.0-or-later',
meson_version : '>=1.4',
default_options : [
'cpp_std=c++17'
]
)
project_api_version = '0.16'
message('Project API version: ' + project_api_version)
project_url = 'https://wiki.gnome.org/Projects/gexiv2'
gnome = import('gnome')
pkg = import('pkgconfig')
exiv2 = dependency('exiv2', version : '>= 0.28')
gobject = dependency('gobject-2.0', version : '>= 2.46.0')
gio = dependency('gio-2.0', version : '>= 2.46.0')
cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
math = cc.find_library('m', required : false)
build_config = configuration_data ()
config_h = configure_file(
output: 'config.h',
configuration: build_config
)
find_program('g-ir-scanner', required: get_option('introspection'))
if get_option('vapi')
if get_option('introspection') == false
error('\'vapi\' build option requires \'introspection\' to be enabled.')
endif
vapi_available = add_languages('vala', required: true, native: false)
endif
subdir('gexiv2')
gidocgen_dep = dependency('gi-docgen', version: '>= 2021.1',
fallback: ['gi-docgen', 'dummy_dep'],
native: true,
required: get_option('gtk_doc') and get_option('introspection'),
disabler: true
)
if get_option('gtk_doc')
subdir('docs')
endif
if get_option('python3')
if get_option('introspection') == false
error('Build option \'python3\' requires \'introspection\' to be enabled.')
endif
python3 = import('python').find_installation('python3', modules: 'gi')
python3.install_sources('GExiv2.py', subdir: 'gi/overrides')
else
python3 = disabler()
endif
if get_option('tests')
subdir('test')
endif
if get_option('tools')
subdir('tools')
endif
if not meson.is_subproject()
meson.add_dist_script('build-aux/dist-docs.py')
endif