mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-23 02:26:35 +00:00
meson: Import python module only once
This commit is contained in:
parent
8f932a7641
commit
ad48d5e8f2
1 changed files with 4 additions and 3 deletions
|
@ -4,6 +4,8 @@ project('gst-plugins-rs',
|
||||||
version: '0.13.0',
|
version: '0.13.0',
|
||||||
meson_version : '>= 0.60')
|
meson_version : '>= 0.60')
|
||||||
|
|
||||||
|
python = import('python').find_installation()
|
||||||
|
|
||||||
if get_option('debug')
|
if get_option('debug')
|
||||||
target = 'debug'
|
target = 'debug'
|
||||||
else
|
else
|
||||||
|
@ -92,8 +94,8 @@ csound_option = get_option('csound')
|
||||||
csound_dep = dependency('', required: false)
|
csound_dep = dependency('', required: false)
|
||||||
if not csound_dep.found() and not csound_option.disabled()
|
if not csound_dep.found() and not csound_option.disabled()
|
||||||
# if csound isn't distributed with pkg-config then user needs to define CSOUND_LIB_DIR with its location
|
# if csound isn't distributed with pkg-config then user needs to define CSOUND_LIB_DIR with its location
|
||||||
python3 = import('python').find_installation()
|
|
||||||
res = run_command(python3, '-c', 'import os; print(os.environ["CSOUND_LIB_DIR"])')
|
res = run_command(python, '-c', 'import os; print(os.environ["CSOUND_LIB_DIR"])')
|
||||||
if res.returncode() == 0
|
if res.returncode() == 0
|
||||||
csound_libdir = res.stdout().strip()
|
csound_libdir = res.stdout().strip()
|
||||||
csound_dep = cc.find_library('csound64', dirs: csound_libdir, required: false)
|
csound_dep = cc.find_library('csound64', dirs: csound_libdir, required: false)
|
||||||
|
@ -190,7 +192,6 @@ else
|
||||||
disable_doc = []
|
disable_doc = []
|
||||||
endif
|
endif
|
||||||
|
|
||||||
python = import('python').find_installation()
|
|
||||||
rs_plugins = custom_target('gst-plugins-rs',
|
rs_plugins = custom_target('gst-plugins-rs',
|
||||||
build_by_default: true,
|
build_by_default: true,
|
||||||
output: output,
|
output: output,
|
||||||
|
|
Loading…
Reference in a new issue