[libgee/meson: 11/21] Meson: Added internal headers VAPI generation
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgee/meson: 11/21] Meson: Added internal headers VAPI generation
- Date: Wed, 17 Mar 2021 11:20:56 +0000 (UTC)
commit 3556791a1b633cc0d9ceda6a6ab53eae527ebfb9
Author: Daniel Espinosa <daniel espinosa pwmc mx>
Date: Thu May 11 23:45:41 2017 -0500
Meson: Added internal headers VAPI generation
Meson has no support to pass --internal-header
and --internal-api, so a merge request has been sent
to meson in order to allow it.
https://github.com/mesonbuild/meson/pull/1780
This is required to finish Unit Test integration with
Meson. So initial meson.build is added, but requires
to fix it in future commits.
doc/meson.build | 2 +-
gee/meson.build | 14 ++++++++------
meson.build | 6 +++---
tests/meson.build | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
utils/meson.build | 3 +--
5 files changed, 63 insertions(+), 12 deletions(-)
---
diff --git a/doc/meson.build b/doc/meson.build
index b31eb2b..750d608 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -3,7 +3,7 @@ outdir ='Gee-'+API_VERSION
valacapi = run_command ('valac', '--api-version')
driver = '--driver='+valacapi.stdout().strip()
pkgname = '--package-name='+'Gee-'+API_VERSION
-pkgversion = '--package-version='+VERSION
+pkgversion = '--package-version='+PROJECT_VERSION
vapidir = '--vapidir='+join_paths (meson.current_source_dir (),'gee')
vapidirvapi = '--vapidir='+join_paths (meson.current_source_dir (),'vapi')
docsdir = join_paths (get_option ('datadir'), 'devhelp','books')
diff --git a/gee/meson.build b/gee/meson.build
index b4be4ac..2d90e12 100644
--- a/gee/meson.build
+++ b/gee/meson.build
@@ -93,22 +93,24 @@ sources = files ([])
includehdir = include_directories ('.')
+includehdir_dep = declare_dependency (include_directories : includehdir)
+
gee = library('gee-@0@'.format(API_VERSION),
valasources + sources + utilsf + utilsvapi,
- version : VERSION,
+ version : PROJECT_VERSION,
vala_header : 'gee.h',
vala_vapi : 'gee-@0@.vapi'.format(API_VERSION),
vala_gir : 'Gee-@0@.gir'.format(API_VERSION),
+ vala_internal_header : 'gee-internals.h',
+ vala_internal_vapi : 'gee-internals-0.8.vapi',
dependencies : [ gio, include_utils_h_dir_dep ],
- vala_args : [
- '--internal-header=gee-internals.h',
- '--internal-vapi=vapi gee-internals-0.8.vapi'
- ],
install : true,
install_dir : [
get_option('libdir'),
join_paths (get_option('includedir'),'gee-@0@'.format (API_VERSION)),
- vapidir,
+ true,
+ true,
+ true,
true
])
diff --git a/meson.build b/meson.build
index 39e56be..994b98c 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,7 @@ VALADEPS = 'gio-2.0'
PCDEPS = 'gio-2.0'
API_VERSION = '0.8'
-VERSION = '0.20.0'
+PROJECT_VERSION = '0.20.0'
conf = configuration_data()
conf.set('prefix', get_option('prefix'))
@@ -15,7 +15,7 @@ conf.set('libdir', join_paths (get_option ('prefix'),get_option ('libdir')))
conf.set('includedir', get_option ('includedir'))
conf.set('VALADEPS', VALADEPS)
conf.set('PCDEPS', PCDEPS)
-conf.set('VERSION', VERSION)
+conf.set('VERSION', PROJECT_VERSION)
conf.set('API_VERSION', API_VERSION)
configure_file(input : 'gee-0.8.pc.in',
@@ -36,5 +36,5 @@ configure_file(input : 'gee.deps.in',
subdir('utils')
subdir('gee')
-subdir('doc')
+#subdir('doc')
#subdir('tests')
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..f35005a
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,50 @@
+testf = files ([
+ 'testarraylist.vala',
+ 'testarrayqueue.vala',
+ 'testbidirlist.vala',
+ 'testbidirsortedmap.vala',
+ 'testbidirsortedset.vala',
+ 'testcase.vala',
+ 'testcollection.vala',
+ 'testconcurrentlist.vala',
+ 'testconcurrentset.vala',
+ 'testdata.vala',
+ 'testdeque.vala',
+ 'testfunctions.vala',
+ 'testhashmap.vala',
+ 'testhashmultimap.vala',
+ 'testhashmultiset.vala',
+ 'testhashset.vala',
+ 'testlinkedlistasdeque.vala',
+ 'testlinkedlist.vala',
+ 'testlist.vala',
+ 'testmain.vala',
+ 'testmap.vala',
+ 'testmultimap.vala',
+ 'testmultiset.vala',
+ 'testpriorityqueue.vala',
+ 'testqueue.vala',
+ 'testreadonlybidirlist.vala',
+ 'testreadonlycollection.vala',
+ 'testreadonlylist.vala',
+ 'testreadonlymap.vala',
+ 'testreadonlyset.vala',
+ 'testset.vala',
+ 'testsortedmap.vala',
+ 'testsortedset.vala',
+ 'testtreemap.vala',
+ 'testtreemultimap.vala',
+ 'testtreemultiset.vala',
+ 'testtreeset.vala',
+ 'testunrolledlinkedlistasdeque.vala',
+ 'testunrolledlinkedlist.vala'
+])
+
+t = executable('tests',
+ testf + utilsvapi,
+ vala_args : [''],
+ dependencies : [ gio, includehdir_dep, include_utils_h_dir_dep ],
+ link_with: gee
+)
+
+test ('gee', t)
diff --git a/utils/meson.build b/utils/meson.build
index b3ae2ce..91d9a4a 100644
--- a/utils/meson.build
+++ b/utils/meson.build
@@ -2,8 +2,7 @@ utilsf = files ([
'assume.h',
'async.h',
'free.h',
- 'misc.h',
- 'geeutils.vapi'])
+ 'misc.h'])
utilsvapi = files (['geeutils.vapi'])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]