devenv: Add some missing GStreamer specific env variables

This should make "meson devenv" closer to what "gst-env.py" sets.

- GST_VALIDATE_SCENARIOS_PATH
- GST_VALIDATE_APPS_DIR
- GST_OMX_CONFIG_DIR
- GST_ENCODING_TARGET_PATH
- GST_PRESET_PATH
- GST_PLUGIN_SCANNER
- GST_PTP_HELPER
- _GI_OVERRIDES_PATH

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1768>
This commit is contained in:
Xavier Claessens 2022-02-21 11:37:26 -05:00 committed by GStreamer Marge Bot
parent 968a26e6f6
commit 3d8372cc50
16 changed files with 64 additions and 4 deletions

View file

@ -37,3 +37,7 @@ install_subdir('includes',
install_subdir('rtsp_overrides', install_subdir('rtsp_overrides',
install_dir: get_option('datadir') + '/gstreamer-' + install_dir: get_option('datadir') + '/gstreamer-' +
apiversion + '/validate/scenarios') apiversion + '/validate/scenarios')
env = environment()
env.prepend('GST_VALIDATE_SCENARIOS_PATH', meson.current_source_dir())
meson.add_devenv(env)

View file

@ -1 +1,5 @@
install_data(['gi/overrides/GES.py'], install_dir: pygi_override_dir) install_data(['gi/overrides/GES.py'], install_dir: pygi_override_dir)
env = environment()
env.prepend('_GI_OVERRIDES_PATH', meson.current_source_dir() / 'gi/overrides')
meson.add_devenv(env)

View file

@ -3,3 +3,7 @@ subdir ('scenarios')
install_data (['geslaunch.py'], install_data (['geslaunch.py'],
install_dir : join_paths(get_option('libdir'), install_dir : join_paths(get_option('libdir'),
'gst-validate-launcher', 'python', 'launcher', 'apps')) 'gst-validate-launcher', 'python', 'launcher', 'apps'))
env = environment()
env.prepend('GST_VALIDATE_APPS_DIR', meson.current_source_dir())
meson.add_devenv(env)

View file

@ -20,3 +20,8 @@ if openssl.found() and have_webrtc_check_deps
'TEST_CA_CERT_PATH=' + join_paths(meson.project_build_root(), 'signalling')]) 'TEST_CA_CERT_PATH=' + join_paths(meson.project_build_root(), 'signalling')])
endforeach endforeach
endif endif
env = environment()
env.prepend('GST_VALIDATE_SCENARIOS_PATH', meson.current_source_dir() / 'validate/scenarios')
env.prepend('GST_VALIDATE_APPS_DIR', meson.current_source_dir() / 'validate')
meson.add_devenv(env)

View file

@ -15,6 +15,7 @@ if sub != ''
subdir (sub) subdir (sub)
# Used by tests to load the proper conf file # Used by tests to load the proper conf file
omx_config_dir = join_paths (meson.current_source_dir(), sub) omx_config_dir = join_paths (meson.current_source_dir(), sub)
meson.add_devenv({'GST_OMX_CONFIG_DIR': omx_config_dir})
else else
omx_config_dir = '' omx_config_dir = ''
endif endif

View file

@ -16,8 +16,15 @@ encoding_targets = [
['device', ['targets/device/dvd.gep',]], ['device', ['targets/device/dvd.gep',]],
] ]
srcdirs = []
foreach path_targets : encoding_targets foreach path_targets : encoding_targets
dir = join_paths(encoding_targetsdir, path_targets.get(0)) dir = join_paths(encoding_targetsdir, path_targets.get(0))
etargets = path_targets.get(1) etargets = path_targets.get(1)
install_data(sources: etargets, install_dir: dir) install_data(sources: etargets, install_dir: dir)
srcdirs += meson.current_source_dir() / 'targets' / path_targets.get(0)
endforeach endforeach
env = environment()
env.prepend('GST_ENCODING_TARGET_PATH', srcdirs)
meson.add_devenv(env)

View file

@ -14,4 +14,7 @@ if voamrwbenc_dep.found()
plugins += [gstvoamrwbenc] plugins += [gstvoamrwbenc]
install_data('GstVoAmrwbEnc.prs', install_dir: presetdir) install_data('GstVoAmrwbEnc.prs', install_dir: presetdir)
env = environment()
env.prepend('GST_PRESET_PATH', meson.current_source_dir())
meson.add_devenv(env)
endif endif

View file

@ -14,3 +14,7 @@ pkgconfig.generate(gstfreeverb, install_dir : plugins_pkgconfig_install_dir)
plugins += [gstfreeverb] plugins += [gstfreeverb]
install_data('GstFreeverb.prs', install_dir: presetdir) install_data('GstFreeverb.prs', install_dir: presetdir)
env = environment()
env.prepend('GST_PRESET_PATH', meson.current_source_dir())
meson.add_devenv(env)

View file

@ -76,4 +76,7 @@ if vpx_dep.found()
plugins += [gstvpx] plugins += [gstvpx]
install_data(sources: ['GstVP8Enc.prs'], install_dir: presetdir) install_data(sources: ['GstVP8Enc.prs'], install_dir: presetdir)
env = environment()
env.prepend('GST_PRESET_PATH', meson.current_source_dir())
meson.add_devenv(env)
endif endif

View file

@ -20,3 +20,7 @@ plugins += [gstequalizer]
install_data(sources: ['GstIirEqualizer3Bands.prs', install_data(sources: ['GstIirEqualizer3Bands.prs',
'GstIirEqualizer10Bands.prs'], install_dir: presetdir) 'GstIirEqualizer10Bands.prs'], install_dir: presetdir)
env = environment()
env.prepend('GST_PRESET_PATH', meson.current_source_dir())
meson.add_devenv(env)

View file

@ -33,3 +33,7 @@ pkgconfig.generate(gstisomp4, install_dir : plugins_pkgconfig_install_dir)
plugins += [gstisomp4] plugins += [gstisomp4]
install_data(sources: 'GstQTMux.prs', install_dir: presetdir) install_data(sources: 'GstQTMux.prs', install_dir: presetdir)
env = environment()
env.prepend('GST_PRESET_PATH', meson.current_source_dir())
meson.add_devenv(env)

View file

@ -12,4 +12,8 @@ if amrnb_dep.found()
pkgconfig.generate(amrnb, install_dir : plugins_pkgconfig_install_dir) pkgconfig.generate(amrnb, install_dir : plugins_pkgconfig_install_dir)
plugins += [amrnb] plugins += [amrnb]
install_data(sources: 'GstAmrnbEnc.prs', install_dir: presetdir) install_data(sources: 'GstAmrnbEnc.prs', install_dir: presetdir)
env = environment()
env.prepend('GST_PRESET_PATH', meson.current_source_dir())
meson.add_devenv(env)
endif endif

View file

@ -33,4 +33,7 @@ if x264_dep.found()
plugins += [gstx264] plugins += [gstx264]
install_data(sources: 'GstX264Enc.prs', install_dir: presetdir) install_data(sources: 'GstX264Enc.prs', install_dir: presetdir)
env = environment()
env.prepend('GST_PRESET_PATH', meson.current_source_dir())
meson.add_devenv(env)
endif endif

View file

@ -8,3 +8,10 @@ gstpython = python.extension_module('_gi_gst',
install_dir : pygi_override_dir, install_dir : pygi_override_dir,
include_directories : [configinc], include_directories : [configinc],
dependencies : [gst_dep, python_dep, pygobject_dep]) dependencies : [gst_dep, python_dep, pygobject_dep])
env = environment()
env.prepend('_GI_OVERRIDES_PATH', [
meson.current_source_dir(),
meson.current_build_dir()
])
meson.add_devenv(env)

View file

@ -1,4 +1,4 @@
executable('gst-plugin-scanner', exe = executable('gst-plugin-scanner',
'gst-plugin-scanner.c', 'gst-plugin-scanner.c',
c_args : gst_c_args, c_args : gst_c_args,
include_directories : [configinc], include_directories : [configinc],
@ -7,6 +7,8 @@ executable('gst-plugin-scanner',
install: true, install: true,
) )
meson.add_devenv({'GST_PLUGIN_SCANNER': exe.full_path()})
# Used in test env setup to make tests find plugin scanner in build tree # Used in test env setup to make tests find plugin scanner in build tree
gst_scanner_dir = meson.current_build_dir() gst_scanner_dir = meson.current_build_dir()
@ -109,7 +111,7 @@ if have_ptp
error('Unexpected ptp helper permissions value: ' + with_ptp_helper_permissions) error('Unexpected ptp helper permissions value: ' + with_ptp_helper_permissions)
endif endif
executable('gst-ptp-helper', 'gst-ptp-helper.c', exe = executable('gst-ptp-helper', 'gst-ptp-helper.c',
c_args : gst_c_args, c_args : gst_c_args,
include_directories : [configinc, libsinc], include_directories : [configinc, libsinc],
dependencies : [gio_dep, gobject_dep, glib_dep, mathlib, gst_dep, cap_dep], dependencies : [gio_dep, gobject_dep, glib_dep, mathlib, gst_dep, cap_dep],
@ -119,6 +121,7 @@ if have_ptp
meson.add_install_script('ptp_helper_post_install.sh', meson.add_install_script('ptp_helper_post_install.sh',
helpers_install_dir, with_ptp_helper_permissions, helpers_install_dir, with_ptp_helper_permissions,
setcap_prog.found() ? setcap_prog.full_path() : '') setcap_prog.found() ? setcap_prog.full_path() : '')
meson.add_devenv({'GST_PTP_HELPER': exe.full_path()})
endif endif
install_data(['gst_gdb.py', 'glib_gobject_helper.py'], install_data(['gst_gdb.py', 'glib_gobject_helper.py'],