forked from nnstreamer/nnstreamer-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
89 lines (71 loc) · 2.28 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
project('nnstreamer-example', 'c', 'cpp',
version: '0.1.0',
license: ['LGPL-2.1'],
meson_version: '>=0.50.0',
default_options: [
'werror=true',
'warning_level=1',
'c_std=gnu89',
'cpp_std=c++11'
]
)
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
# Set install path
nnst_exam_prefix = get_option('prefix')
nnst_exam_libdir = join_paths(nnst_exam_prefix, get_option('libdir'))
nnst_exam_bindir = join_paths(nnst_exam_prefix, get_option('bindir'))
subplugins_install_dir = nnst_exam_libdir
examples_install_dir = nnst_exam_bindir
# Dependencies
glib_dep = dependency('glib-2.0')
gmodule_dep = dependency('gmodule-2.0')
gst_dep = dependency('gstreamer-1.0')
gst_base_dep = dependency('gstreamer-base-1.0')
gst_video_dep = dependency('gstreamer-video-1.0')
gst_audio_dep = dependency('gstreamer-audio-1.0')
gst_app_dep = dependency('gstreamer-app-1.0')
cairo_dep = dependency('cairo')
libm_dep = cc.find_library('m') # cmath library
libdl_dep = cc.find_library('dl') # DL library
thread_dep = dependency('threads') # pthread for tensorflow-lite
# Dependency for custom filter examples
nns_dep = dependency('nnstreamer', required: false)
# Dependency for tensorflow example
tf_dep = dependency('tensorflow', required: false)
protobuf_dep = dependency('protobuf', version: '>= 3.4.0', required: false)
have_tensorflow = false
if tf_dep.found() and protobuf_dep.found()
have_tensorflow = true
endif
# Dependency for tensorflow-lite example
tflite_dep = dependency('tensorflow-lite', required: false)
have_tensorflow_lite = false
if tflite_dep.found()
have_tensorflow_lite = true
endif
# Dependency for caffe2 example
caffe2_dep = dependency('caffe2', required: false)
have_caffe2 = false
if caffe2_dep.found() and protobuf_dep.found()
have_caffe2 = true
endif
# Dependency for nnfw example
nnfw_dep = dependency('nnfw', required: false)
if not nnfw_dep.found()
nnfw_dep = cc.find_library('nnfw-dev', required: false)
endif
have_nnfw = false
if nnfw_dep.found()
have_nnfw = true
endif
# Dependency for openvino example
openvino_dep = dependency('openvino', required: false)
have_openvino = false
if openvino_dep.found()
have_openvino = true
endif
# Build and install nnstreamer native examples
subdir('native')
# Install nnstreamer script examples
subdir('bash_script')