diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-09-21 21:48:31 +0530 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2022-09-22 22:31:21 +0000 |
commit | 6caa8524dd9a5fd1763b78f1745f08644267d889 (patch) | |
tree | 56899d1d84e0f95f1e6e7783ebbbb09b862f856f /meson.build | |
parent | 0e73b368704ccf7e9d5fc89ff42d0a3ef1dee00d (diff) | |
download | gstreamer-6caa8524dd9a5fd1763b78f1745f08644267d889.tar.gz |
meson: Add a new option to control the source for orc
Previously we were unconditionally cloning the orc subproject because
we want the developer environment to use the latest orc. However, some
people want to use the system orc instead, or want to auto-detect
which to use, with the system orc getting preference. This requires
adding a new option to select that. See discussion at:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2556
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1282
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3062>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 47567e6e4b..5922429121 100644 --- a/meson.build +++ b/meson.build @@ -119,7 +119,19 @@ elif build_system == 'darwin' subproject('macos-bison-binary') endif -orc_subproject = subproject('orc', required: get_option('orc')) +orc_option = get_option('orc') +# There is a check below to keep this in sync with subprojects/gst-plugins-base/meson.build +orc_req = '>= 0.4.24' +orc_source_option = get_option('orc-source') +orc_subproject = disabler() +if orc_option.allowed() + if orc_source_option == 'subproject' + orc_subproject = subproject('orc', required: orc_option) + else + dependency('orc-0.4', version: orc_req, required: orc_option, + allow_fallback: orc_source_option == 'auto') + endif +endif foreach custom_subproj: get_option('custom_subprojects').split(',') if custom_subproj != '' @@ -157,6 +169,14 @@ foreach sp : subprojects subproj = subproject(project_name, required: is_required, default_options: default_options) endif + if project_name == 'gst-plugins-base' + gst_base_orc_req = subproj.get_variable('orc_req', '') + if gst_base_orc_req != orc_req + error('orc_req is "@0@" but it should be "@1@" from subprojects/gst-plugins-base/meson.build' + .format(orc_req, gst_base_orc_req)) + endif + endif + if subproj.found() plugins = subproj.get_variable('gst_plugins', []) legacy_plugins = subproj.get_variable('plugins', []) |