-
Notifications
You must be signed in to change notification settings - Fork 11
/
meson.build
70 lines (56 loc) · 1.7 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
project('vipsdisp', 'c',
version: '3.1.0',
license: 'MIT',
meson_version: '>=0.56',
default_options: [
# glib uses this, so we do too
'c_std=gnu11',
# do a release (optimised) build by default
'buildtype=release',
# turn off asserts etc. in release mode
'b_ndebug=if-release'
]
)
application_id = 'org.libvips.vipsdisp'
pkg = import('pkgconfig')
gnome = import('gnome')
cc = meson.get_compiler('c')
config_h = configuration_data()
set_defines = [
['APPLICATION_ID', application_id],
['PACKAGE', meson.project_name()],
['VERSION', meson.project_version()],
]
foreach define: set_defines
config_h.set_quoted(define[0], define[1])
endforeach
add_project_arguments('-DHAVE_CONFIG_H', language: 'c')
# so it can find config.h
add_project_arguments('-I.', language: 'c')
configure_file(
output: 'config.h',
configuration: config_h,
)
# need vips_thread_execute()
vips_dep = dependency('vips', version: '>=8.16')
glib_dep = dependency('glib-2.0')
gtk_dep = dependency('gtk4')
m_dep = cc.find_library('m')
if not cc.has_header_symbol('glib.h', 'g_autofree', dependencies : glib_dep)
error('vipsdisp requires the GNU C "cleanup" attribute.')
endif
vipsdisp_deps = [
vips_dep,
gtk_dep,
m_dep,
]
install_data(application_id + '.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0' / 'schemas')
install_data(application_id + '.png',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / '128x128' / 'apps')
install_data(application_id + '.desktop',
install_dir: get_option('datadir') / 'applications')
install_data(application_id + '.metainfo.xml',
install_dir: get_option('datadir') / 'metainfo')
meson.add_install_script('meson_post_install.py')
subdir('src')