From 60dbf278969aac8c2fc299416ad13a6ec382ec6d Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 2 Jul 2019 18:52:44 +0900 Subject: [PATCH] Add meson build script make build easy with meson --- webrtc/meson.build | 28 ++++++++++++++++++++++++++++ webrtc/multiparty-sendrecv/gst/meson.build | 3 +++ webrtc/multiparty-sendrecv/meson.build | 1 + webrtc/sendrecv/gst/meson.build | 3 +++ webrtc/sendrecv/meson.build | 1 + 5 files changed, 36 insertions(+) create mode 100644 webrtc/meson.build create mode 100644 webrtc/multiparty-sendrecv/gst/meson.build create mode 100644 webrtc/multiparty-sendrecv/meson.build create mode 100644 webrtc/sendrecv/gst/meson.build create mode 100644 webrtc/sendrecv/meson.build diff --git a/webrtc/meson.build b/webrtc/meson.build new file mode 100644 index 0000000..482b824 --- /dev/null +++ b/webrtc/meson.build @@ -0,0 +1,28 @@ +project('gstwebrtc-demo', 'c', + meson_version : '>= 0.48', + default_options : [ 'warning_level=1', + 'buildtype=debug' ]) + +cc = meson.get_compiler('c') + +if cc.get_id() == 'msvc' + add_project_arguments( + cc.get_supported_arguments(['/utf-8']), # set the input encoding to utf-8 + language : 'c') +endif + +gst_req = '>= 1.14.0' +gst_dep = dependency('gstreamer-1.0', version : gst_req, + fallback : ['gstreamer', 'gst_dep']) +gstsdp_dep = dependency('gstreamer-sdp-1.0', version : gst_req, + fallback : ['gst-plugins-base', 'sdp_dep']) +gstwebrtc_dep = dependency('gstreamer-webrtc-1.0', version : gst_req, + fallback : ['gst-plugins-bad', 'gstwebrtc_dep']) + +libsoup_dep = dependency('libsoup-2.4', version : '>=2.48', + fallback : ['libsoup', 'libsoup_dep']) +json_glib_dep = dependency('json-glib-1.0', + fallback : ['json-glib', 'json_glib_dep']) + +subdir('multiparty-sendrecv') +subdir('sendrecv') diff --git a/webrtc/multiparty-sendrecv/gst/meson.build b/webrtc/multiparty-sendrecv/gst/meson.build new file mode 100644 index 0000000..86a6062 --- /dev/null +++ b/webrtc/multiparty-sendrecv/gst/meson.build @@ -0,0 +1,3 @@ +executable('mp-webrtc-sendrecv', + 'mp-webrtc-sendrecv.c', + dependencies : [gst_dep, gstsdp_dep, gstwebrtc_dep, libsoup_dep, json_glib_dep ]) diff --git a/webrtc/multiparty-sendrecv/meson.build b/webrtc/multiparty-sendrecv/meson.build new file mode 100644 index 0000000..668dcba --- /dev/null +++ b/webrtc/multiparty-sendrecv/meson.build @@ -0,0 +1 @@ +subdir('gst') diff --git a/webrtc/sendrecv/gst/meson.build b/webrtc/sendrecv/gst/meson.build new file mode 100644 index 0000000..7150e42 --- /dev/null +++ b/webrtc/sendrecv/gst/meson.build @@ -0,0 +1,3 @@ +executable('webrtc-sendrecv', + 'webrtc-sendrecv.c', + dependencies : [gst_dep, gstsdp_dep, gstwebrtc_dep, libsoup_dep, json_glib_dep ]) diff --git a/webrtc/sendrecv/meson.build b/webrtc/sendrecv/meson.build new file mode 100644 index 0000000..668dcba --- /dev/null +++ b/webrtc/sendrecv/meson.build @@ -0,0 +1 @@ +subdir('gst') -- 2.7.4