| 1 |
subdir('ptp') |
| 2 |
|
| 3 |
gst_helpers = { |
| 4 |
'gst-plugin-scanner': { |
| 5 |
'files': files('gst-plugin-scanner.c'), |
| 6 |
'deps': [gst_dep, mathlib, gmodule_dep], |
| 7 |
'env': ['GST_PLUGIN_SCANNER', 'exe-full-path'], |
| 8 |
'install_dir': helpers_install_dir, |
| 9 |
}, |
| 10 |
'gst-completion-helper': { |
| 11 |
'files': files('gst-completion-helper.c'), |
| 12 |
'deps': [gst_dep], |
| 13 |
'install_dir': helpers_install_dir, |
| 14 |
}, |
| 15 |
} |
| 16 |
|
| 17 |
if not get_option('tools').disabled() and not static_build |
| 18 |
foreach helper, data: gst_helpers |
| 19 |
exe_name = '@0@'.format(helper) |
| 20 |
exe = executable(exe_name, |
| 21 |
data.get('files'), |
| 22 |
install: data.get('install', true), |
| 23 |
install_tag: 'bin', |
| 24 |
install_dir: data.get('install_dir', get_option('bindir')), |
| 25 |
include_directories : [configinc], |
| 26 |
dependencies : data.get('deps', []), |
| 27 |
c_args: data.get('extra_c_args', []) + ['-DG_LOG_DOMAIN="@0@"'.format(exe_name)], |
| 28 |
) |
| 29 |
if(data.has_key('env')) |
| 30 |
env = data.get(('env')) |
| 31 |
value = env[1] |
| 32 |
if env[1] == 'exe-full-path' |
| 33 |
value = exe.full_path() |
| 34 |
endif |
| 35 |
meson.add_devenv({env[0]: value}) |
| 36 |
endif |
| 37 |
|
| 38 |
if data.has_key('man_page') |
| 39 |
install_man(data.get('man_page')) |
| 40 |
endif |
| 41 |
endforeach |
| 42 |
endif |
| 43 |
|
| 44 |
# Used in test env setup to make tests find plugin scanner in build tree |
| 45 |
gst_scanner_dir = meson.current_build_dir() |
| 46 |
|
| 47 |
|
| 48 |
install_data(['gst_gdb.py', 'glib_gobject_helper.py'], |
| 49 |
install_dir : join_paths(get_option('datadir'), 'gstreamer-@0@'.format(api_version), 'gdb'), |
| 50 |
install_tag : 'devel') |
| 51 |
|
| 52 |
# This is needed to make gdb find gst_gdb.py |
| 53 |
env = environment() |
| 54 |
env.prepend('PYTHONPATH', [meson.current_source_dir(), meson.current_build_dir()]) |
| 55 |
meson.add_devenv(env) |
| 56 |
|
| 57 |
gdbconf = configuration_data() |
| 58 |
gdbconf.set('GST_API_VERSION', api_version) |
| 59 |
gdbconf.set('DATADIR', '@0@/@1@'.format(get_option('prefix'), get_option('datadir'))) |
| 60 |
|
| 61 |
if host_system != 'windows' |
| 62 |
# XXX: We add a leading './' because prefix is an absolute path and we |
| 63 |
# need it to be a relative path so that join_paths appends it to the end. |
| 64 |
gdb_install_dir = join_paths(get_option('datadir'), 'gdb', 'auto-load', './' + get_option('prefix'), get_option('libdir')) |
| 65 |
else |
| 66 |
# FIXME: Cannot install on Windows because the path will contain a drive |
| 67 |
# letter and colons are not allowed in paths. |
| 68 |
gdb_install_dir = disabler() |
| 69 |
endif |
| 70 |
configure_file(input : 'libgstreamer-gdb.py.in', |
| 71 |
output : 'libgstreamer-@[email protected].@[email protected]'.format(api_version, libversion), |
| 72 |
install_dir : gdb_install_dir, |
| 73 |
install_tag : 'devel', |
| 74 |
configuration : gdbconf) |