meson: Add a new option to control the source for build-tools

Similar to orc, allow distros to force bison, flex, nasm, etc, to be
provided by the system.

Needed by the Homebrew folks:
https://github.com/Homebrew/homebrew-core/pull/125996#discussion_r1166410216

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4428>
This commit is contained in:
Nirbheek Chauhan 2023-04-14 13:13:24 +05:30
parent 3a09e700e6
commit beb21f9254
2 changed files with 8 additions and 5 deletions

View file

@ -113,12 +113,14 @@ subprojects = [
['gst-plugins-rs', { 'option': get_option('rs'), 'build-hotdoc': true, 'match_gst_version': false}],
]
if get_option('build-tools-source') == 'subproject'
if build_system == 'windows'
subproject('win-flex-bison-binaries')
subproject('win-nasm')
elif build_system == 'darwin'
subproject('macos-bison-binary')
endif
endif
orc_option = get_option('orc')
# There is a check below to keep this in sync with subprojects/gst-plugins-base/meson.build

View file

@ -39,6 +39,7 @@ option('gst-full-device-providers', type : 'string', value : '',
option('gst-full-dynamic-types', type : 'string', value : '',
description : '''List of dynamic types to expose in gstreamer-full's ABI with the syntax plugin:dt1,dt2. By default '' will export all device provider of the enabled plugin.''')
option('orc-source', type: 'combo', choices: ['system', 'subproject', 'auto'], value: 'subproject')
option('build-tools-source', type: 'combo', choices: ['system', 'subproject'], value: 'subproject')
# License-related feature options
option('gpl', type: 'feature', value: 'disabled',