mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
build: meson: build examples
This commit is contained in:
parent
5171a3d5b1
commit
254eb9507f
4 changed files with 109 additions and 1 deletions
|
@ -68,6 +68,9 @@ x11_dep = dependency('x11', required: false)
|
|||
xrandr_dep = dependency('xrandr', required: false)
|
||||
xrender_dep = dependency('xrender', required: false)
|
||||
|
||||
# some of the examples can use GTK+-3
|
||||
gtk_dep = dependency('gtk+-3.0', version : '>= 3.10', required : get_option('examples'))
|
||||
|
||||
GLES_VERSION_MASK = gl_dep.found() ? 1 : 0
|
||||
if glesv2_dep.found()
|
||||
if (cc.has_header('GLES2/gl2.h', dependencies: glesv2_dep) and
|
||||
|
@ -182,7 +185,9 @@ libsinc = include_directories('gst-libs')
|
|||
|
||||
subdir('gst-libs')
|
||||
subdir('gst')
|
||||
#subdir('tests')
|
||||
if not get_option('examples').disabled()
|
||||
subdir('tests')
|
||||
endif
|
||||
|
||||
python3 = import('python3').find_python()
|
||||
run_command(python3, '-c', 'import shutil; shutil.copy("hooks/pre-commit.hook", ".git/hooks/pre-commit")')
|
||||
|
|
|
@ -4,3 +4,7 @@ option('with_x11', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'aut
|
|||
option('with_glx', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
|
||||
option('with_wayland', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
|
||||
option('with_egl', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
|
||||
|
||||
# Common feature options
|
||||
option('examples', type : 'feature', value : 'auto', yield : true)
|
||||
option('gtk_doc', type : 'feature', value : 'auto', yield : true, description : 'Build API documentation with gtk-doc')
|
||||
|
|
24
tests/elements/meson.build
Normal file
24
tests/elements/meson.build
Normal file
|
@ -0,0 +1,24 @@
|
|||
examples = [
|
||||
'test-vaapisink',
|
||||
'test-vaapipostproc',
|
||||
'test-roi',
|
||||
]
|
||||
|
||||
foreach example : examples
|
||||
executable(example, '@0@.c'.format(example),
|
||||
c_args : gstreamer_vaapi_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [gst_dep, gstvideo_dep],
|
||||
install: false)
|
||||
endforeach
|
||||
|
||||
executable('test-vaapicontext', 'test-vaapicontext.c',
|
||||
c_args : gstreamer_vaapi_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [ gst_dep,
|
||||
gstvideo_dep,
|
||||
libva_dep,
|
||||
x11_dep,
|
||||
gtk_dep,
|
||||
libva_x11_dep ],
|
||||
install: false)
|
75
tests/meson.build
Normal file
75
tests/meson.build
Normal file
|
@ -0,0 +1,75 @@
|
|||
libdecutils_sources = [
|
||||
'decoder.c',
|
||||
'test-h264.c',
|
||||
'test-jpeg.c',
|
||||
'test-mpeg2.c',
|
||||
'test-mpeg4.c',
|
||||
'test-vc1.c',
|
||||
]
|
||||
|
||||
libdecutils_headers = [
|
||||
'decoder.h',
|
||||
'test-h264.h',
|
||||
'test-jpeg.h',
|
||||
'test-mpeg2.h',
|
||||
'test-mpeg4.h',
|
||||
'test-vc1.h',
|
||||
]
|
||||
|
||||
libutils_sources = [
|
||||
'codec.c',
|
||||
'image.c',
|
||||
'output.c',
|
||||
'test-subpicture-data.c',
|
||||
'y4mreader.c',
|
||||
]
|
||||
|
||||
libutils_headers = [
|
||||
'codec.h',
|
||||
'image.h',
|
||||
'output.h',
|
||||
'test-subpicture-data.h',
|
||||
'y4mreader.h',
|
||||
]
|
||||
|
||||
test_examples = [
|
||||
'simple-decoder',
|
||||
'test-decode',
|
||||
'test-display',
|
||||
'test-filter',
|
||||
'test-surfaces',
|
||||
'test-windows',
|
||||
'test-subpicture',
|
||||
]
|
||||
|
||||
if USE_ENCODERS
|
||||
test_examples += [ 'simple-encoder' ]
|
||||
endif
|
||||
if USE_GLX
|
||||
test_examples += [ 'test-textures' ]
|
||||
endif
|
||||
|
||||
libutils = static_library('libutils',
|
||||
libutils_sources + libutils_headers,
|
||||
c_args : gstreamer_vaapi_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : gstlibvaapi_deps,
|
||||
install: false)
|
||||
|
||||
libdecutils = static_library('libdecutils',
|
||||
libdecutils_sources + libdecutils_headers,
|
||||
c_args : gstreamer_vaapi_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : gstlibvaapi_deps,
|
||||
install: false)
|
||||
|
||||
foreach example : test_examples
|
||||
executable(example, '@0@.c'.format(example),
|
||||
c_args : gstreamer_vaapi_args,
|
||||
include_directories: [configinc, libsinc],
|
||||
dependencies : [gst_dep, libva_dep, gstlibvaapi_dep],
|
||||
link_with: [libutils, libdecutils],
|
||||
install: false)
|
||||
endforeach
|
||||
|
||||
subdir('elements')
|
Loading…
Reference in a new issue