[libgfbgraph/wip/memnoth/port-to-meson] Init meson



commit feba82f298baeffbc6695fbfe9bc7e82fffdac8a
Author: Leesoo Ahn <yisooan fedoraproject org>
Date:   Sat May 18 16:02:25 2019 +0900

    Init meson

 gfbgraph/meson.build | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 meson.build          | 33 +++++++++++++++++++++++++++++++++
 tests/meson.build    | 23 +++++++++++++++++++++++
 3 files changed, 108 insertions(+)
---
diff --git a/gfbgraph/meson.build b/gfbgraph/meson.build
new file mode 100644
index 0000000..2e5a19b
--- /dev/null
+++ b/gfbgraph/meson.build
@@ -0,0 +1,52 @@
+lib_sources = [
+  'gfbgraph-album.c',
+  'gfbgraph-authorizer.c',
+  'gfbgraph-common.c',
+  'gfbgraph-connectable.c',
+  'gfbgraph-goa-authorizer.c',
+  'gfbgraph-node.c',
+  'gfbgraph-photo.c',
+  'gfbgraph-simple-authorizer.c',
+  'gfbgraph-user.c',
+]
+
+lib_headers = [
+  'gfbgraph.h',
+  'gfbgraph-album.h',
+  'gfbgraph-authorizer.h',
+  'gfbgraph-common.h',
+  'gfbgraph-connectable.h',
+  'gfbgraph-goa-authorizer.h',
+  'gfbgraph-node.h',
+  'gfbgraph-photo.h',
+  'gfbgraph-simple-authorizer.h',
+  'gfbgraph-user.h',
+]
+
+lib_deps = [
+  dependency('glib-2.0'),
+  dependency('gio-2.0'),
+  dependency('json-glib-1.0'),
+  dependency('rest-0.7'),
+  dependency('libsoup-2.4'),
+  dependency('goa-1.0'),
+]
+
+lib_c_args = [
+  '-DG_LOG_DOMAIN="GFBGraph"'
+]
+
+extra_c_args = [
+  '-DLIBSOUP_USE_UNSTABLE_REQUEST_API',
+  '-DGOA_API_IS_SUBJECT_TO_CHANGE'
+]
+
+gfbgraph_lib = shared_library('gfbgraph-' + api_version,
+  lib_sources,
+  include_directories: root_dir,
+  dependencies: lib_deps,
+  c_args: lib_c_args + extra_c_args,
+  install: true,
+)
+
+install_headers(lib_headers, subdir: 'gfbgraph')
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..bb5f4ca
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,33 @@
+project('libgfbgraph', 'c',
+        version: '0.2.4',
+        meson_version: '>=0.48',
+        license: 'LGPL2.1')
+
+gnome = import('gnome')
+
+gfbgraph_version = meson.project_version()
+version_split = gfbgraph_version.split('.')
+MAJOR_VERSION = version_split[0]
+MINOR_VERSION = version_split[1]
+MICRO_VERSION = version_split[2]
+
+api_version = '@0@.@1@'.format(MAJOR_VERSION, MINOR_VERSION)
+
+root_dir = include_directories('.')
+
+subdir('gfbgraph')
+
+subdir('tests')
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..6f579b4
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,23 @@
+test('autoptr',
+  executable('autoptr', 'autoptr.c',
+             include_directories: root_dir,
+             dependencies: lib_deps,
+             c_args: lib_c_args,
+             link_with: gfbgraph_lib),
+  env: [
+    'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+    'G_TEST_BUILDDIR=@0@'.format(meson.current_source_dir()),
+  ]
+)
+
+test('gtestutils',
+  executable('gtestutils', 'gtestutils.c',
+             include_directories: root_dir,
+             dependencies: lib_deps,
+             c_args: lib_c_args,
+             link_with: gfbgraph_lib),
+  env: [
+    'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+    'G_TEST_BUILDDIR=@0@'.format(meson.current_source_dir()),
+  ]
+)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]