-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
58 lines (52 loc) · 1.34 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
project('gst-sensors', 'c',
version: '0.1',
meson_version : '>= 0.45.0',
license: 'LGPL2+',
default_options: [
'c_std=c11',
'buildtype=debug',
'warning_level=3',
'werror=true',
])
cflags = [
'-Wno-unused-parameter',
'-DHAVE_CONFIG_H=1'
]
add_project_arguments(cflags, language: 'c')
# Config header generation.
conf = configuration_data()
conf.set_quoted('PACKAGE', meson.project_name())
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set_quoted('GST_LICENSE', meson.project_license())
conf.set_quoted('GST_PACKAGE_NAME', meson.project_name())
conf.set_quoted('GST_PACKAGE_ORIGIN', 'github/XevoInc')
configure_file(
input: 'src/config.h.meson',
output: 'config.h',
configuration : conf)
# Dependencies.
libgps_dep = dependency('libgps')
deps = [
dependency('gstreamer-1.0'),
dependency('gstreamer-base-1.0'),
libgps_dep
]
# gstreamer package variables
plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir'))
# gstsensors library.
src_files = [
'src/gstgpsd.c',
]
lib = library(
'gstsensors',
src_files,
install: true,
install_dir: plugins_install_dir,
dependencies: deps)
gst_sensors_dep = declare_dependency(link_with: lib)
# Examples.
executable(
'gpscrack',
['example/gpscrack.c'],
dependencies: libgps_dep
)