Commit a9c61e46 authored by Seungha Yang's avatar Seungha Yang 🐑

meson: Add support orc fallback

Allow fallback to orc subproject if any, and add missing orc version check.
Additionally 'dependencies' keyword is removed from find_library,
because it's invalid keyword for find_library.
parent 19382f1e
Pipeline #16911 passed with stages
in 29 minutes and 32 seconds
......@@ -17,6 +17,7 @@ endif
gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90
glib_req = '>= 2.40.0'
orc_req = '>= 0.4.17'
gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor)
api_version = '1.0'
......@@ -359,7 +360,8 @@ endif
have_orcc = false
orcc_args = []
# Used by various libraries/elements that use Orc code
orc_dep = dependency('orc-0.4', required : get_option('orc'))
orc_dep = dependency('orc-0.4', version : orc_req, required : get_option('orc'),
fallback : ['orc', 'orc_dep'])
orcc = find_program('orcc', required : get_option('orc'))
if orc_dep.found() and orcc.found()
have_orcc = true
......
......@@ -151,13 +151,18 @@ orc_tests = [
['orc_bayer', files('../../gst/bayer/gstbayerorc.orc')],
]
orc_test_dep = dependency('', required : false)
if have_orcc
# FIXME: there should really just be a separate orc-test-0.4.pc file for this
if orc_dep.type_name() == 'pkgconfig'
orc_test_dep = cc.find_library('orc-test-0.4', dependencies: orc_dep)
else
orc_test_dep = cc.find_library('orc-test-0.4', required : false)
endif
if not orc_test_dep.found()
orc_test_dep = dependency('', fallback: ['orc', 'orc_test_dep'])
endif
endif
if have_orcc and orc_test_dep.found()
foreach t : orc_tests
tname = t[0]
torcfile = t[1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment