mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
windows: unconditionally use flex / bison binaries
This to simplify the checks made when for example a flex binary is available system wide: the build process was failing when that system wide binary didn't have the required version. Instead of adding more checks and making things more complex, let's just always use our binary subproject.
This commit is contained in:
parent
8c04a523ee
commit
2ffe372bdd
2 changed files with 11 additions and 23 deletions
|
@ -55,10 +55,7 @@ os.symlink(os.path.join('@1@', 'subprojects', '@0@'),
|
||||||
os.path.join('@1@', '@0@'))
|
os.path.join('@1@', '@0@'))
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# On Windows, if flex/bison aren't found, we use a subproject to get them
|
if build_system == 'windows'
|
||||||
flex = find_program('flex', 'win_flex', required : build_system != 'windows')
|
|
||||||
bison = find_program('bison', 'win_bison', required : build_system != 'windows')
|
|
||||||
if not flex.found() or not bison.found()
|
|
||||||
subproject('win-flex-bison-binaries')
|
subproject('win-flex-bison-binaries')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,16 @@
|
||||||
project('win-flex-bison-binary', version : '2.5.14')
|
project('win-flex-bison-binary', version : '2.5.14')
|
||||||
|
|
||||||
provide_flex = not find_program('flex', required : false).found()
|
py3 = import('python3').find_python()
|
||||||
provide_bison = not find_program('bison', required : false).found()
|
|
||||||
|
|
||||||
if provide_flex or provide_bison
|
message('Downloading and extracting win-flex-bison binaries...')
|
||||||
py3 = import('python3').find_python()
|
|
||||||
|
|
||||||
message('Downloading and extracting win-flex-bison binaries...')
|
zip_hash = '354c9aae02aca421c52abfda7fe3ce6c32ad07e25ff3f66e31da9437a0b906cf'
|
||||||
|
|
||||||
zip_hash = '354c9aae02aca421c52abfda7fe3ce6c32ad07e25ff3f66e31da9437a0b906cf'
|
ret = run_command(py3, files('download-binary.py'), meson.project_version(), zip_hash)
|
||||||
|
if ret.returncode() != 0
|
||||||
ret = run_command(py3, files('download-binary.py'), meson.project_version(), zip_hash)
|
message(ret.stdout())
|
||||||
if ret.returncode() != 0
|
error(ret.stderr())
|
||||||
message(ret.stdout())
|
|
||||||
error(ret.stderr())
|
|
||||||
endif
|
|
||||||
|
|
||||||
if provide_flex
|
|
||||||
meson.override_find_program('flex', find_program('win_flex'))
|
|
||||||
endif
|
|
||||||
if provide_bison
|
|
||||||
meson.override_find_program('bison', find_program('win_bison'))
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
meson.override_find_program('flex', find_program('win_flex'))
|
||||||
|
meson.override_find_program('bison', find_program('win_bison'))
|
||||||
|
|
Loading…
Reference in a new issue