forked from GNOME/shotwell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
141 lines (120 loc) · 4.88 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
project('shotwell', ['vala', 'c'],
version : '0.30.8',
meson_version : '>= 0.43.0',
default_options : ['buildtype=debugoptimized'])
gnome = import('gnome')
i18n = import('i18n')
enableWindowsSupport = host_machine.system() == 'windows'
if enableWindowsSupport
windows = import('windows')
endif
conf = configuration_data()
conf.set('GETTEXT_PACKAGE', '"@0@"'.format(meson.project_name().to_lower()))
conf.set('_VERSION', '"@0@"'.format(meson.project_version()))
conf.set('_PREFIX', '"@0@"'.format(get_option('prefix')))
conf.set('_LANG_SUPPORT_DIR', '"@0@"'.format(join_paths(get_option('prefix'), get_option('localedir'))))
conf.set('_LIBEXECDIR', '"@0@"'.format(join_paths(get_option('prefix'), get_option('libexecdir'))))
conf.set('_LIB', '"@0@"'.format(join_paths(get_option('prefix'), get_option('libdir'))))
conf.set('_WINDOWS', '"@0@"'.format(enableWindowsSupport))
configure_file(output : 'config.h', configuration: conf)
config_incdir = include_directories('.')
vapi_incdir = include_directories('vapi')
shotwell_plugin_dir = join_paths(get_option('libdir'), 'shotwell', 'plugins', 'builtin')
add_global_arguments(['-DHAVE_CONFIG_H=1'],
['-include'], ['config.h'], language : 'c')
add_global_arguments(['--target-glib=2.40',
'--vapidir=@0@'.format(join_paths(meson.current_source_dir(),
'vapi')),
'--enable-checking',
'--fatal-warnings',
'--enable-experimental',
'--enable-deprecated'], language : 'vala')
gitver = run_command(find_program('git-hash'))
if gitver.returncode() == 0
add_global_arguments(['-D_GIT_VERSION="@0@"'.format(gitver.stdout().strip())],
language : 'c')
add_global_arguments(['--define=_GITVERSION'], language : 'vala')
endif
gtk = dependency('gtk+-3.0', version : '>= 3.22')
gio = dependency('gio-2.0', version: '>= 2.40')
gmodule = dependency('gmodule-2.0', version: '>= 2.40')
gee = dependency('gee-0.8', version: '>= 0.8.5')
# only required for publisher plugins
if not enableWindowsSupport
webkit = dependency('webkit2gtk-4.0', version: '>= 2.4')
else
webkit = dependency('webkit2gtk-4.0', version: '>= 2.4', required: false)
endif
soup = dependency('libsoup-2.4')
json_glib = dependency('json-glib-1.0')
xml = dependency('libxml-2.0')
gdk = dependency('gdk-3.0', version : '>= 3.22')
gdk_pixbuf = dependency('gdk-pixbuf-2.0')
sqlite = dependency('sqlite3', version : '>= 3.5.9')
gstreamer = dependency('gstreamer-1.0', version : '>= 1.0')
gstreamer_pbu = dependency('gstreamer-pbutils-1.0', version : '>= 1.0')
gphoto2 = dependency('libgphoto2', version : '>= 2.5.0')
gudev = dependency('gudev-1.0', version : '>= 145', required: false)
gexiv2 = dependency('gexiv2', version: '>= 0.10.4')
if gexiv2.version().version_compare('>= 0.11')
add_global_arguments(['--define=NEW_GEXIV2_API'], language : 'vala')
endif
libraw = dependency('libraw', version : '>= 0.13.2')
libexif = dependency('libexif', version : '>= 0.6.16')
unity = dependency('unity', required : false)
unity_available = false
if unity.found() and get_option('unity-support')
unity_available = true
add_global_arguments(['--define=UNITY_SUPPORT'], language : 'vala')
endif
foreach publisher : get_option('publishers').split(',')
add_global_arguments(['--define=HAVE_@0@'.format(publisher.to_upper())],
language : 'vala')
endforeach
foreach trace : get_option('trace').split(',')
add_global_arguments(['--define=TRACE_@0@'.format(trace.to_upper().underscorify())],
language : 'vala')
endforeach
foreach measure : get_option('measure').split(',')
add_global_arguments(['--define=MEASURE_@0@'.format(trace.to_upper().underscorify())],
language : 'vala')
endforeach
if not get_option('dupe-detection')
add_global_arguments(['--define=NO_DUPE_DETECTION'], language : 'vala')
endif
if get_option('udev') and gudev.found()
add_global_arguments(['--define=HAVE_UDEV'], language : 'vala')
endif
if get_option('face-detection')
add_global_arguments(['--define=ENABLE_FACES'], language : 'vala')
subdir('facedetect')
endif
if enableWindowsSupport
add_global_arguments(['--define=ENABLE_WINDOWS'], language : 'vala')
endif
json_glib = dependency('json-glib-1.0')
gdata = dependency('libgdata')
if not enableWindowsSupport
gcr = dependency('gcr-3')
gcr_ui = dependency('gcr-ui-3')
endif
cairo = dependency('cairo')
valac = meson.get_compiler('vala')
posix = valac.find_library('posix')
shotwell_resources = gnome.compile_resources('shotwell-resources',
'org.gnome.Shotwell.gresource.xml')
subdir('src')
subdir('plugins')
subdir('po')
subdir('help')
subdir('misc')
subdir('thumbnailer')
subdir('settings-migrator')
if not enableWindowsSupport
subdir('test')
endif
subdir('app-icons')
meson.add_install_script('build-aux/meson/postinstall.py')
if get_option('install-apport-hook')
subdir('apport')
endif