summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2018-01-30 10:31:03 +0100
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2018-01-30 11:54:37 +0000
commit13a43757f592e6ad14dc9d0eee214fd0e840842b (patch)
tree04dad0b742d61c0a40db1a0b56f60f600018db2c /meson.build
parentf0469c99d2c05497991650ebf402095b1711e5f4 (diff)
downloadgst-omx-13a43757f592e6ad14dc9d0eee214fd0e840842b.tar.gz
meson: simplify OMX extensions detection
We are now always checking which files are present or not, even when using our internal copy of OMX, rather than hardcoding the ones present in it. https://bugzilla.gnome.org/show_bug.cgi?id=792043
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build55
1 files changed, 24 insertions, 31 deletions
diff --git a/meson.build b/meson.build
index 8e71c46..c5a67c9 100644
--- a/meson.build
+++ b/meson.build
@@ -169,7 +169,10 @@ gst_omx_args = ['-DHAVE_CONFIG_H']
configinc = include_directories('.')
omx_header_path = get_option('with_omx_header_path')
if omx_header_path != ''
+ omx_inc = []
gst_omx_args += ['-I' + omx_header_path]
+else
+ omx_inc = include_directories (join_paths ('omx', 'openmax'))
endif
default_omx_struct_packing = 0
@@ -204,6 +207,7 @@ elif omx_target == 'zynqultrascaleplus'
have_allegro_header = cc.has_header (
'OMX_Allegro.h',
args : gst_omx_args,
+ include_directories : [omx_inc],
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.')
@@ -218,46 +222,32 @@ else
error ('Unsupported omx target specified. Use the -Dwith_omx_target option')
endif
-have_external_omx = cc.has_header(
- 'OMX_Core.h',
+extra_video_headers = ''
+# Check for optional OpenMAX extension headers
+
+if cc.has_header (
+ 'OMX_VideoExt.h',
args : gst_omx_args,
+ include_directories : [omx_inc],
required : false)
-extra_video_headers = ''
-# Our internal OpenMAX IL headers have OMX_VideoExt.h, OMX_IndexExt.h and OMX_ComponentExt.h
-have_video_ext = true
-have_index_ext = true
-have_component_ext = true
-
-if have_external_omx
- have_video_ext = cc.has_header (
- 'OMX_VideoExt.h',
- args : gst_omx_args,
- required : false)
- if have_video_ext
- extra_video_headers += '''
+ extra_video_headers += '''
#include <OMX_VideoExt.h>'''
- endif
-
- have_index_ext = cc.has_header (
- 'OMX_IndexExt.h',
- args : gst_omx_args,
- required : false)
-
- have_component_ext = cc.has_header (
- 'OMX_ComponentExt.h',
- args : gst_omx_args,
- required : false)
-endif
-
-if have_video_ext
cdata.set ('HAVE_VIDEO_EXT', 1)
endif
-if have_index_ext
+if cc.has_header (
+ 'OMX_IndexExt.h',
+ args : gst_omx_args,
+ include_directories : [omx_inc],
+ required : false)
cdata.set ('HAVE_INDEX_EXT', 1)
endif
-if have_component_ext
+if cc.has_header (
+ 'OMX_ComponentExt.h',
+ args : gst_omx_args,
+ include_directories : [omx_inc],
+ required : false)
cdata.set ('HAVE_COMPONENT_EXT', 1)
endif
@@ -266,6 +256,7 @@ have_omx_vp8 = cc.has_header_symbol(
'OMX_VIDEO_CodingVP8',
prefix : extra_video_headers,
args : gst_omx_args,
+ include_directories : [omx_inc],
required : false)
if have_omx_vp8
cdata.set('HAVE_VP8', 1)
@@ -276,6 +267,7 @@ have_omx_theora = cc.has_header_symbol(
'OMX_VIDEO_CodingTheora',
prefix : extra_video_headers,
args : gst_omx_args,
+ include_directories : [omx_inc],
required : false)
if have_omx_theora
cdata.set('HAVE_THEORA', 1)
@@ -286,6 +278,7 @@ have_omx_hevc = cc.has_header_symbol(
'OMX_VIDEO_CodingHEVC',
prefix : extra_video_headers,
args : gst_omx_args,
+ include_directories : [omx_inc],
required : false)
if have_omx_hevc
cdata.set('HAVE_HEVC', 1)