forked from AravisProject/aravis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
65 lines (52 loc) · 2.4 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
project ('aravis', 'c', 'cpp', version: '0.7.5', meson_version: '>=0.47.0')
gnome = import('gnome')
pkg = import ('pkgconfig')
aravis_version = meson.project_version ()
aravis_api_version = '0.8'
versions = aravis_version.split ('.')
aravis_major_version = versions[0].to_int ()
aravis_minor_version = versions[1].to_int ()
aravis_micro_version = versions[2].to_int ()
aravis_data_dir = join_paths (get_option ('datadir'), 'aravis-@0@'.format (aravis_api_version))
cc = meson.get_compiler ('c')
cxx = meson.get_compiler ('cpp')
glib_dep = dependency ('glib-2.0', version: '>=2.44', required: true)
gobject_dep = dependency ('gobject-2.0', required: true)
gio_dep = dependency ('gio-2.0', required: true)
xml2_dep = dependency ('libxml-2.0', required: true)
libz_dep = dependency ('zlib', required: true)
usb_dep = dependency ('libusb-1.0', required: get_option ('usb'))
libm = cc.find_library ('m', required: true)
aravis_public_dependencies = [glib_dep, gobject_dep, gio_dep]
aravis_dependencies = [aravis_public_dependencies, xml2_dep, libz_dep, libm]
if usb_dep.found()
aravis_dependencies += usb_dep
endif
has_if_packet = cc.has_header (join_paths ('linux','if_packet.h'))
packet_socket_option = get_option('packet-socket')
if packet_socket_option.enabled()
if not has_if_packet
error ('missing header for packet-socket support')
endif
packet_socket_enabled = true
else
packet_socket_enabled = has_if_packet and packet_socket_option.auto()
endif
subdir ('src')
subdir ('tests')
viewer_enabled = false
viewer_option = get_option ('viewer')
viewer_deps = aravis_dependencies + [dependency ('gtk+-3.0', version: '>=3.12', required: viewer_option),
dependency ('gstreamer-base-1.0', required: viewer_option),
dependency ('gstreamer-app-1.0', required: viewer_option),
dependency ('gstreamer-video-1.0', required: viewer_option),
dependency ('libnotify', required: viewer_option)]
subdir ('po', if_found: viewer_deps)
subdir ('viewer', if_found: viewer_deps)
gst_option = get_option ('gst-plugin')
gst_deps = aravis_dependencies + [dependency ('gstreamer-base-1.0', required: gst_option),
dependency ('gstreamer-app-1.0', required: gst_option)]
subdir('gst', if_found: gst_deps)
doc_option = get_option('documentation')
doc_deps = [find_program('gtkdoc-scan', required: doc_option), find_program('xsltproc', required: doc_option)]
subdir('docs', if_found: doc_deps)