mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
Don't allow people to run meson inside the uninstalled env
People should not run `meson` on gst-build inside the uninstalled env. It will cause problems because meson will detect the already-built libraries and pkg-config files. This is not obvious to people, and they often make this mistake.
This commit is contained in:
parent
9c4cb201d0
commit
01eb252f67
1 changed files with 14 additions and 1 deletions
15
meson.build
15
meson.build
|
@ -11,6 +11,20 @@ glib_req = '>= 2.44.0'
|
|||
build_system = build_machine.system()
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
python3 = import('python').find_installation()
|
||||
# Ensure that we're not being run from inside the gst-uninstalled env
|
||||
# because that will confuse meson, and it might find the already-built
|
||||
# gstreamer. It's fine if people run `ninja` as long as it doesn't run
|
||||
# reconfigure because ninja doesn't care about the env.
|
||||
ensure_not_uninstalled = '''
|
||||
import os
|
||||
assert('GST_ENV' not in os.environ)
|
||||
'''
|
||||
cmdres = run_command(python3, '-c', ensure_not_uninstalled)
|
||||
if cmdres.returncode() != 0
|
||||
error('Do not run `ninja` or `meson` for gst-build inside the uninstalled environment, you will run into problems')
|
||||
endif
|
||||
|
||||
documented_projects = ''
|
||||
# Make it possible to use msys2 built zlib which fails
|
||||
# when not using the mingw toolchain as it uses unistd.h
|
||||
|
@ -51,7 +65,6 @@ subprojects = [
|
|||
['gst-python', { 'option': get_option('python'), 'has-plugins': true}],
|
||||
]
|
||||
|
||||
python3 = import('python').find_installation()
|
||||
symlink = '''
|
||||
import os
|
||||
|
||||
|
|
Loading…
Reference in a new issue