Skip to content

Commit

Permalink
meson: Add support orc fallback
Browse files Browse the repository at this point in the history
Allow fallback to orc subproject if any.
Additionally 'dependencies' keyword is removed from find_library,
because it's invalid keyword for find_library.
  • Loading branch information
seungha-yang committed Jan 30, 2019
1 parent 1a5fb98 commit 57aba89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion meson.build
Expand Up @@ -309,7 +309,8 @@ gst_controller_dep = dependency('gstreamer-controller-1.0', version : gst_req,
have_orcc = false
orcc_args = []
# Used by various libraries/elements that use Orc code
orc_dep = dependency('orc-0.4', version : orc_req, 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
Expand Down
9 changes: 7 additions & 2 deletions tests/check/meson.build
Expand Up @@ -199,13 +199,18 @@ orc_tests = [
['orc_videotestsrc', files('../../gst/videotestsrc/gstvideotestsrcorc.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]
Expand Down

0 comments on commit 57aba89

Please sign in to comment.