forked from Freescale/gstreamer-imx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
86 lines (60 loc) · 2.97 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
project('gstreamer-imx', 'c', default_options : ['c_std=c99'], version : '2.0.0', license: 'LGPL-2.0-or-later', meson_version: '>= 0.54.0')
message('Setting up build configuration for gstreamer-imx version ' + meson.project_version())
cc = meson.get_compiler('c')
pkg = import('pkgconfig')
# test for miscellaneous system libraries
libdl_dep = cc.find_library('dl', required : true)
libm_dep = cc.find_library('m', required : true)
# test for libimxdmabuffer
libimxdmabuffer_dep = dependency('libimxdmabuffer', version : '>=1.0.1', required : true, method : 'pkg-config')
libimxdmabuffer_ion = libimxdmabuffer_dep.get_pkgconfig_variable('libimxdmabuffer_ion', default : '')
ion_support = (libimxdmabuffer_ion != '0') and (libimxdmabuffer_ion != '')
if ion_support
message('libimxdmabuffer supports ION allocation - enabling ION GstAllocator')
else
message('libimxdmabuffer does not support ION allocation - not enabling ION GstAllocator')
endif
# test for GStreamer libraries
gstreamer_dep = dependency('gstreamer-1.0', version : '>=1.14.0', required : true)
gstreamer_base_dep = dependency('gstreamer-base-1.0', version : '>=1.14.0', required : true)
gstreamer_allocators_dep = dependency('gstreamer-allocators-1.0', version : '>=1.14.0', required : true)
gstreamer_audio_dep = dependency('gstreamer-audio-1.0', version : '>=1.14.0', required : false)
gstreamer_video_dep = dependency('gstreamer-video-1.0', version : '>=1.14.0', required : false)
if gstreamer_audio_dep.found()
message('found gstaudio library - building audio plugins')
else
message('could not find gstaudio library - not building audio plugins')
endif
if gstreamer_video_dep.found()
message('found gstvideo library - building video plugins')
else
message('could not find gstvideo library - not building video plugins')
endif
plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
imx_headers_path = get_option('imx-headers-path')
sys_root = get_option('sysroot')
if sys_root != ''
message('Using sysroot from command line argument: "' + sys_root + '"')
else
sys_root = meson.get_external_property('sys_root', '', native: false)
message('Using sysroot from meson external properties: "' + sys_root + '"')
endif
configinc = include_directories('.')
libsinc = include_directories('gst-libs')
conf_data = configuration_data()
conf_data.set_quoted('GST_PACKAGE_NAME', get_option('package-name'))
conf_data.set_quoted('GST_PACKAGE_ORIGIN', get_option('package-origin'))
conf_data.set_quoted('PACKAGE', 'gstreamer-imx')
conf_data.set_quoted('PACKAGE_BUGREPORT', 'https://github.com/Freescale/gstreamer-imx')
conf_data.set_quoted('VERSION', meson.project_version())
if ion_support
conf_data.set('WITH_GST_ION_ALLOCATOR', 1)
endif
subdir('gst-libs/imx2d')
subdir('gst-libs/gst/imx/common')
subdir('gst-libs/gst/imx/video')
subdir('ext/vpu')
subdir('ext/audio')
subdir('ext/imx2d')
subdir('sys/v4l2video')
configure_file(output : 'config.h', configuration : conf_data)