[gupnp-igd/wip/meson] build: Initial meson files
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp-igd/wip/meson] build: Initial meson files
- Date: Tue, 29 Oct 2019 15:55:34 +0000 (UTC)
commit 2d384fb1c2b77114792d8d98ac6b4e49ed86dec7
Author: Jens Georg <mail jensge org>
Date: Tue Oct 29 16:55:11 2019 +0100
build: Initial meson files
libgupnp-igd/meson.build | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
meson.build | 15 +++++++++++++
meson_options.txt | 1 +
tests/gtest/meson.build | 7 ++++++
tests/meson.build | 2 ++
5 files changed, 83 insertions(+)
---
diff --git a/libgupnp-igd/meson.build b/libgupnp-igd/meson.build
new file mode 100644
index 0000000..a1bcb76
--- /dev/null
+++ b/libgupnp-igd/meson.build
@@ -0,0 +1,58 @@
+marshal = gnome.genmarshal(
+ 'gupnp-simple-igd-marshal',
+ sources : 'gupnp-simple-igd-marshal.list',
+ prefix : '_gupnp_simple_igd_marshal'
+)
+
+headers = files(
+ 'gupnp-simple-igd.h',
+ 'gupnp-simple-igd-thread.h'
+)
+
+install_headers(headers, subdir: 'gupnp-igd-1.0/libgupnp-igd')
+
+sources = files(
+ 'gupnp-enum-types.c',
+ 'gupnp-enum-types.h',
+ 'gupnp-simple-igd.c',
+ 'gupnp-simple-igd-priv.h',
+ 'gupnp-simple-igd-thread.c'
+)
+
+libgupnp_igd = library(
+ 'gupnp-igd-1.0',
+ sources + marshal,
+ version: '4.2.0',
+ include_directories: include_directories('..'),
+ dependencies : dependencies,
+ install: true)
+
+gupnp_igd = declare_dependency(
+ link_with : libgupnp_igd,
+ include_directories : include_directories('..'),
+ dependencies: dependencies
+)
+
+pkg.generate(
+ libraries : libgupnp_igd,
+ name : 'gupnp-igd-1.0',
+ subdirs : 'gupnp-igd-1.0',
+ filebase : 'gupnp-igd-1.0',
+ description: 'GUPnP Simple IGD library',
+ requires : 'gupnp-1.0'
+)
+
+
+if get_option('introspection')
+ gnome.generate_gir(
+ libgupnp_igd,
+ sources : headers + sources + marshal,
+ namespace : 'GUPnPIgd',
+ nsversion : '1.0',
+ symbol_prefix: ['gupnp', 'gupnp_igd'],
+ identifier_prefix : 'GUPnP',
+ install: true,
+ export_packages : 'gupnp-1.0',
+ includes : ['GObject-2.0']
+ )
+endif
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..17f99e9
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,15 @@
+project('gupnp-igd', 'c', version: '0.2.5')
+
+gnome = import('gnome')
+pkg = import('pkgconfig')
+
+dependencies = [
+ dependency('glib-2.0', version: '>= 2.26', required: true),
+ dependency('gobject-2.0', version: '>= 2.26', required: true),
+ dependency('gssdp-1.0', required: true),
+ dependency('gupnp-1.0', version: '>= 0.18', required: true),
+ dependency('gthread-2.0', required: true)
+]
+
+subdir('libgupnp-igd')
+subdir('tests')
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..1a21516
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1 @@
+option('introspection', type: 'boolean', value : true, description: 'Enable or disable GObject
Introspection')
diff --git a/tests/gtest/meson.build b/tests/gtest/meson.build
new file mode 100644
index 0000000..3190290
--- /dev/null
+++ b/tests/gtest/meson.build
@@ -0,0 +1,7 @@
+simple_test = executable(
+ 'gupnp-simple-igd',
+ files('gupnp-simple-igd.c'),
+ dependencies : gupnp_igd,
+)
+
+test('gupnp-simple-igd', simple_test, is_parallel: false)
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..7b68596
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,2 @@
+subdir('gtest')
+#subdir('examples')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]