mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
dd17beb681
Allow a project to use gstreamer-full as a static library and link to create a binary without dependencies. Introduce the option 'gst-full-target-type' to select the build type, dynamic(default) or static. In gstreamer-full/static build configuration gstreamer (gst.c) needs the symbol gst_init_static_plugins which is defined in gstreamer-full. All the tests and examples are linking with gstreamer but the symbol gst_init_static_plugins is only defined in the gstreamer-full library. gstreamer-full can not be built first as it needs to know what plugins will be built. One option would be to build all the examples and tests after gstreamer-full as the tools. Disable tools build in subprojects too as it will be built at the end of build process. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4128>
44 lines
1.4 KiB
Meson
44 lines
1.4 KiB
Meson
project('gst-examples', 'c', version : '1.23.0.1', license : 'LGPL')
|
|
|
|
static_build = get_option('default_library') == 'static'
|
|
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
|
|
|
|
host_system = host_machine.system()
|
|
|
|
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)
|
|
|
|
gio_dep = dependency('gio-2.0')
|
|
|
|
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'])
|
|
|
|
if static_build
|
|
subdir_done()
|
|
endif
|
|
|
|
subdir('playback')
|
|
subdir('network')
|
|
subdir('webrtc')
|