-
Notifications
You must be signed in to change notification settings - Fork 4
/
meson.build
82 lines (71 loc) · 3.33 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
# Project Declaration
project('media-library', 'c', 'cpp',
version : '0.1.0',
default_options : [ 'warning_level=2',
'buildtype=release',
'werror=true',
'c_std=c11', 'cpp_std=c++20']
)
# Compiler Arguments
add_global_arguments('-Wpessimizing-move', language : 'cpp')
add_global_arguments('-Wredundant-move', language : 'cpp')
add_global_arguments('-fconcepts', language : 'cpp')
add_global_arguments('-Wno-unused-variable', language : 'cpp')
add_global_arguments('-Wno-unused-parameter', language : 'cpp')
add_global_arguments('-Wno-format', language : 'cpp')
add_global_arguments('-Wno-format-security', language : 'cpp')
add_global_arguments('-Wno-cast-function-type', language : 'cpp')
pkgc = import('pkgconfig')
targets = get_option('targets')
if 'docs' in targets
subdir('docs')
subdir_done()
endif
subdir('common_meson')
# Gstreamer Dependencies
gst_req = '>= 1.0.0'
gst_dep = dependency('gstreamer-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_dep'])
gst_base_dep = dependency('gstreamer-base-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_base_dep'])
gst_app_dep = dependency('gstreamer-app-1.0', version : gst_req,
fallback : ['gstreamer', 'gst_app_dep'])
gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'video_dep'])
gstallocators_dep = dependency('gstreamer-allocators-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'allocators_dep'])
gstreamer_deps = [gst_dep, gst_base_dep, gstvideo_dep, gst_app_dep, gstallocators_dep]
rapidjson_dep = dependency('RapidJSON', method : 'pkg-config')
json_dep = meson.get_compiler('cpp').find_library('libnlohmann_json_schema_validator', required: true, dirs: '/usr/lib/')
opencv_dep = dependency('opencv4', version : '>= 4.0', method : 'pkg-config', include_type : 'system')
spdlog_dep = dependency('spdlog', version: '1.9.2')
if 'core' in targets
subdir('media_library')
else
media_library_common_dep = dependency('hailo_media_library_common', method : 'pkg-config', required:false)
media_library_frontend_dep = dependency('hailo_media_library_frontend', method : 'pkg-config', required:false)
media_library_encoder_dep = dependency('hailo_media_library_encoder', method : 'pkg-config', required:false)
encoder_dep = dependency('hailo_encoder', method : 'pkg-config', required:false)
gyro_lib_dep = dependency('hailo_media_library_gyro', method : 'pkg-config', required:false)
endif
if 'gst' in targets
if 'core' not in targets
if (not media_library_frontend_dep.found() or
not media_library_common_dep.found() or
not encoder_dep.found() or
not media_library_encoder_dep.found())
error('Media library core package is missing. please make sure it is located in your system or add core target to the build')
endif
endif
subdir('gst')
else
gstmedialibrary_utils_dep = dependency('gstmedialibutils', method : 'pkg-config', required:false)
endif
if 'api' in targets
if 'gst' not in targets
if (not gstmedialibrary_utils_dep.found())
error('Gstreamer media library utils package is missing. please make sure it is located in your system or add gst target to the build')
endif
endif
subdir('api')
endif