summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Isorce <jisorce@oblong.com>2017-12-11 15:55:44 +0000
committerJulien Isorce <jisorce@oblong.com>2017-12-11 15:59:22 +0000
commitff74c66a9a5e0b78a22e8de470180f32ae01aa08 (patch)
tree9ce4533ecf8caee6a2e16d531fc1c284100ca1d4
parentcefbbbc8bf715d1a1d4bd6aad496791bce75a270 (diff)
downloadgst-omx-ff74c66a9a5e0b78a22e8de470180f32ae01aa08.tar.gz
meson: move omx features check after target selection
And uses gst_omx_args instead of add_global_arguments. Similar to c69232852120d064c689caef07b3c68ad8fe6288 which was only for configure.ac Useful to get omxvp8dec with meson too: meson . buildtmp -D with_omx_target=tizonia https://bugzilla.gnome.org/show_bug.cgi?id=782800
-rw-r--r--meson.build92
1 files changed, 46 insertions, 46 deletions
diff --git a/meson.build b/meson.build
index 12f3ec1..1269614 100644
--- a/meson.build
+++ b/meson.build
@@ -170,6 +170,52 @@ if omx_header_path != ''
gst_omx_args += ['-I' + omx_header_path]
endif
+default_omx_struct_packing = 0
+omx_target = get_option ('with_omx_target')
+if omx_target == 'generic'
+ cdata.set('USE_OMX_TARGET_GENERIC', 1)
+elif omx_target == 'rpi'
+ cdata.set('USE_OMX_TARGET_RPI', 1)
+ cdata.set('OMX_SKIP64BIT', 1)
+ default_omx_struct_packing = 4
+
+ if gstgl_dep.found()
+ if gstgl_dep.type_name() == 'pkgconfig'
+ gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys').split(',')
+ gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms').split(',')
+ elif gstgl_dep.type_name() == 'internal'
+ # XXX assume gst-plugins-bad was built with dispmanx and egl support
+ gl_winsys = ['dispmanx']
+ gl_platforms = ['egl']
+ else
+ error ('unreachable dependency type')
+ endif
+
+ if not gl_winsys.contains('dispmanx') or not gl_platforms.contains ('egl')
+ gstgl_dep = dependency('', required : false)
+ endif
+ endif
+elif omx_target == 'bellagio'
+ cdata.set('USE_OMX_TARGET_BELLAGIO', 1)
+elif omx_target == 'zynqultrascaleplus'
+ cdata.set('USE_OMX_TARGET_ZYNQ_USCALE_PLUS', 1)
+ have_allegro_header = cc.has_header (
+ 'OMX_Allegro.h',
+ args : gst_omx_args,
+ required : false)
+ if not have_allegro_header
+ error ('Need Allegro OMX headers to build for Zynq UltraScale+. Use with_omx_header_path option to specify the path of those headers.')
+ endif
+elif omx_target == 'tizonia'
+ cdata.set('USE_OMX_TARGET_TIZONIA', 1)
+ tizil_dep = dependency('tizilheaders', version : tizil_req)
+ cdata.set('TIZONIA_LIBDIR', tizil_dep.get_pkgconfig_variable('libdir'))
+ tizil_includedir = tizil_dep.get_pkgconfig_variable('includedir')
+ gst_omx_args += ['-I' + tizil_includedir + '/tizonia']
+else
+ error ('Unsupported omx target specified. Use the -Dwith_omx_target option')
+endif
+
have_external_omx = cc.has_header(
'OMX_Core.h',
args : gst_omx_args,
@@ -243,52 +289,6 @@ if have_omx_hevc
cdata.set('HAVE_HEVC', 1)
endif
-default_omx_struct_packing = 0
-omx_target = get_option ('with_omx_target')
-if omx_target == 'generic'
- cdata.set('USE_OMX_TARGET_GENERIC', 1)
-elif omx_target == 'rpi'
- cdata.set('USE_OMX_TARGET_RPI', 1)
- cdata.set('OMX_SKIP64BIT', 1)
- default_omx_struct_packing = 4
-
- if gstgl_dep.found()
- if gstgl_dep.type_name() == 'pkgconfig'
- gl_winsys = gstgl_dep.get_pkgconfig_variable('gl_winsys').split(',')
- gl_platforms = gstgl_dep.get_pkgconfig_variable('gl_platforms').split(',')
- elif gstgl_dep.type_name() == 'internal'
- # XXX assume gst-plugins-bad was built with dispmanx and egl support
- gl_winsys = ['dispmanx']
- gl_platforms = ['egl']
- else
- error ('unreachable dependency type')
- endif
-
- if not gl_winsys.contains('dispmanx') or not gl_platforms.contains ('egl')
- gstgl_dep = dependency('', required : false)
- endif
- endif
-elif omx_target == 'bellagio'
- cdata.set('USE_OMX_TARGET_BELLAGIO', 1)
-elif omx_target == 'zynqultrascaleplus'
- cdata.set('USE_OMX_TARGET_ZYNQ_USCALE_PLUS', 1)
- have_allegro_header = cc.has_header (
- 'OMX_Allegro.h',
- args : gst_omx_args,
- required : false)
- if not have_allegro_header
- error ('Need Allegro OMX headers to build for Zynq UltraScale+. Use with_omx_header_path option to specify the path of those headers.')
- endif
-elif omx_target == 'tizonia'
- cdata.set('USE_OMX_TARGET_TIZONIA', 1)
- tizil_dep = dependency('tizilheaders', version : tizil_req)
- cdata.set('TIZONIA_LIBDIR', tizil_dep.get_pkgconfig_variable('libdir'))
- tizil_includedir = tizil_dep.get_pkgconfig_variable('includedir')
- add_global_arguments('-I' + tizil_includedir + '/tizonia', language : 'C')
-else
- error ('Unsupported omx target specified. Use the -Dwith_omx_target option')
-endif
-
if gstgl_dep.found()
cdata.set ('HAVE_GST_GL', 1)
endif