summaryrefslogtreecommitdiff
path: root/meson.build
blob: 7d0cab3571113f628d5b7ceb44e95405c4267bcd (plain)
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
project('gst-examples', 'c', version : '1.19.0.1', license : 'LGPL')

cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required : false)

if cc.get_id() == 'msvc'
  add_project_arguments(
      cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8
      language : 'c')
endif

gst_version = meson.project_version()
version_arr = gst_version.split('.')

gst_version_major = version_arr[0].to_int()
gst_version_minor = version_arr[1].to_int()

gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)

glib_dep = dependency('glib-2.0', version: '>= 2.38',
    fallback: ['glib', 'libglib_dep'])
gio_dep = dependency('gio-2.0',
    fallback: ['glib', 'libgio_dep'])
gobject_dep = dependency('gobject-2.0', version: '>= 2.38',
    fallback: ['glib', 'libgobject_dep'])
gmodule_dep = dependency('gmodule-2.0',
    fallback: ['glib', 'libgmodule_dep'])

gst_dep = dependency('gstreamer-1.0', version: gst_req,
    fallback : ['gstreamer', 'gst_dep'])
gstplay_dep = dependency('gstreamer-play-1.0', version: gst_req,
    fallback: ['gst-plugins-bad', 'gstplay_dep'])
gsttag_dep = dependency('gstreamer-tag-1.0', version: gst_req,
    fallback: ['gst-plugins-base', 'tag_dep'])
gstwebrtc_dep = dependency('gstreamer-webrtc-1.0', version: gst_req,
    fallback: ['gst-plugins-bad', 'gstwebrtc_dep'])
gstsdp_dep = dependency('gstreamer-sdp-1.0', version : gst_req,
    fallback : ['gst-plugins-base', 'sdp_dep'])
gstrtp_dep = dependency('gstreamer-rtp-1.0', version : gst_req,
    fallback : ['gst-plugins-base', 'rtp_dep'])

subdir('playback')
subdir('network')
subdir('webrtc')