From f7c192a44072de99137802d6e0a53aa410dd97d5 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 22 Aug 2017 16:29:58 -0300 Subject: [PATCH] Add csharp/gstreamer-sharp support --- gst-uninstalled.py | 7 +++++++ meson.build | 13 +++++++++++++ meson_options.txt | 1 + subprojects/gstreamer-sharp.wrap | 5 +++++ subprojects/gtk-sharp.wrap | 4 ++++ 5 files changed, 30 insertions(+) create mode 100644 subprojects/gstreamer-sharp.wrap create mode 100644 subprojects/gtk-sharp.wrap diff --git a/gst-uninstalled.py b/gst-uninstalled.py index ed6fb2affe..a773801ad7 100755 --- a/gst-uninstalled.py +++ b/gst-uninstalled.py @@ -61,9 +61,12 @@ def get_subprocess_env(options): targets_s = subprocess.check_output([sys.executable, mesonintrospect, options.builddir, '--targets']) targets = json.loads(targets_s.decode()) paths = set() + mono_paths = set() for target in targets: filename = target['filename'] root = os.path.dirname(filename) + if filename.endswith('.dll'): + mono_paths.add(os.path.join(options.builddir, root)) if typelib_reg.search(filename): prepend_env_var(env, "GI_TYPELIB_PATH", os.path.join(options.builddir, root)) @@ -83,6 +86,10 @@ def get_subprocess_env(options): for p in paths: prepend_env_var(env, 'PATH', p) + if os.name != 'nt': + for p in mono_paths: + prepend_env_var(env, "MONO_PATH", p) + presets = set() encoding_targets = set() pkg_dirs = set() diff --git a/meson.build b/meson.build index 7d263ca392..fb20ebfcee 100644 --- a/meson.build +++ b/meson.build @@ -87,6 +87,18 @@ if not get_option('disable_rtsp_server') subprojects += ['gst-rtsp-server'] endif +if not get_option('disable_gstreamer_sharp') + if add_languages('cs') + if meson.version().version_compare('>=0.43') + subprojects += ['gstreamer-sharp'] + else + message('WARNING: Not building gstramer-sharp as meson >=0.43 not found.') + endif + else + message('WARNING: Not building gstramer-sharp as no CS compiler found.') + endif +endif + python3 = find_program('python3') symlink = ''' import os @@ -102,6 +114,7 @@ foreach custom_subproj: get_option('custom_subprojects').split(',') endif endforeach +message('Building subprojects: ' + ', '.join(subprojects)) foreach subproj: subprojects default_options = [] if get_option('disable_introspection') diff --git a/meson_options.txt b/meson_options.txt index 65ebe13a45..95acaad1b4 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -7,6 +7,7 @@ option('disable_gst_editing_services', type : 'boolean', value : false) option('disable_rtsp_server', type : 'boolean', value : false) option('disable_gst_omx', type : 'boolean', value : true) option('disable_gstreamer_vaapi', type : 'boolean', value : false) +option('disable_gstreamer_sharp', type : 'boolean', value : false) option('disable_introspection', type : 'boolean', value : false, description : 'Whether to disable the introspection generation') diff --git a/subprojects/gstreamer-sharp.wrap b/subprojects/gstreamer-sharp.wrap new file mode 100644 index 0000000000..dbf9eaac64 --- /dev/null +++ b/subprojects/gstreamer-sharp.wrap @@ -0,0 +1,5 @@ +[wrap-git] +directory=gstreamer-sharp +url=https://anongit.freedesktop.org/git/gstreamer/gstreamer-sharp.git +push-url=ssh://git.freedesktop.org/git/gstreamer/gstreamer-sharp +revision=master diff --git a/subprojects/gtk-sharp.wrap b/subprojects/gtk-sharp.wrap new file mode 100644 index 0000000000..e589619293 --- /dev/null +++ b/subprojects/gtk-sharp.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory=gtk-sharp +url=https://github.com/gtk-sharp/gtk-sharp.git +revision=master