[gssdp/wip/meson: 1/17] meson: Initial support
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp/wip/meson: 1/17] meson: Initial support
- Date: Fri, 26 Oct 2018 14:44:53 +0000 (UTC)
commit 37524210b1969e295e2a5191235c5753ea8277fd
Author: Jens Georg <mail jensge org>
Date: Fri Oct 26 16:43:29 2018 +0200
meson: Initial support
Signed-off-by: Jens Georg <mail jensge org>
libgssdp/meson.build | 41 +++++++++++++++++++++++++++++++++++++++++
meson.build | 43 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 84 insertions(+)
---
diff --git a/libgssdp/meson.build b/libgssdp/meson.build
new file mode 100644
index 0000000..0097022
--- /dev/null
+++ b/libgssdp/meson.build
@@ -0,0 +1,41 @@
+headers = [
+ 'gssdp-client.h',
+ 'gssdp-resource-browser.h',
+ 'gssdp-resource-group.h',
+ 'gssdp.h'
+ ]
+install_headers(headers, subdir : 'gssdp-1.0/libgssdp')
+
+sources = [
+ 'gssdp-client.c',
+ 'gssdp-error.c',
+ 'gssdp-resource-browser.c',
+ 'gssdp-resource-group.c',
+ 'gssdp-client-private.h',
+ 'gssdp-protocol.h',
+ 'gssdp-socket-source.c',
+ 'gssdp-socket-source.h',
+ 'gssdp-socket-functions.c',
+ 'gssdp-socket-functions.h'
+ ]
+
+if host_machine.system() == 'windows'
+ sources += 'gssdp-net-win32.c'
+endif
+
+if bionic_available
+ sources += 'gssdp-net-bionic.c'
+endif
+
+if generic_unix
+ sources += 'gssdp-net-posix.c'
+endif
+
+deps = [glib_dep, gobject_dep, gio_dep, soup_dep] + system_deps
+
+libgssdp = shared_library('gssdp-1.2', sources,
+ soversion : 0,
+ version : '0.0.0',
+ dependencies : deps,
+ include_directories : include_directories('..'),
+ install : true)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..b3b24e7
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,43 @@
+project('GSSDP', 'c', version: '1.1.0')
+
+as_version = meson.project_version() # set in project() below
+ver_arr = as_version.split('.')
+
+as_major_version = ver_arr[0]
+as_minor_version = ver_arr[1]
+as_micro_version = ver_arr[2]
+
+conf = configuration_data()
+conf.set('VERSION', '"@0@"'.format(meson.project_version()))
+configure_file(output : 'config.h', configuration : conf)
+
+add_global_arguments('-DHAVE_CONFIG_H=1', language : 'c')
+
+cc = meson.get_compiler('c')
+system_deps = []
+
+# Check whether we are compiling against Android libc
+bionic_test = '''#include <sys/cdefs.h>
+#if !defined(__BIONIC__)
+ #error "Not compiling against Android libc"
+#endif'''
+bionic_available = cc.compiles(bionic_test, name : 'android libc')
+if bionic_available
+ system_deps += cc.find_library('log', required: true)
+endif
+
+# Check whether we are compiling on/against windows
+if host_machine.system() == 'windows'
+ system_deps += cc.find_library('ws2_32', required: true)
+ system_deps += cc.find_library('iphlpapi', required: true)
+endif
+
+# Assume "other" unix or linux then
+generic_unix = not bionic_available and host_machine.system() != 'windows'
+
+glib_dep = dependency('glib-2.0', version : '>= 2.32')
+gobject_dep = dependency('gobject-2.0', version : '>= 2.32')
+gio_dep = dependency('gio-2.0', version : '>= 2.32')
+soup_dep = dependency('libsoup-2.4', version : '>= 2.26.1')
+
+subdir('libgssdp')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]