[gnome-calculator] GCalc: added configuration to be used as meson subproject
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator] GCalc: added configuration to be used as meson subproject
- Date: Fri, 7 Jun 2019 20:50:18 +0000 (UTC)
commit 4aec2b43d27e0ecbf696c81dbec89bcdb3ca0093
Author: Daniel Espinosa <esodan gmail com>
Date: Fri Jun 7 15:49:37 2019 -0500
GCalc: added configuration to be used as meson subproject
gcalc/meson.build | 19 +++++++++++++------
tests/meson.build | 4 ++--
2 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/gcalc/meson.build b/gcalc/meson.build
index 06517e27..8ddc0935 100644
--- a/gcalc/meson.build
+++ b/gcalc/meson.build
@@ -120,7 +120,7 @@ sources = files([
inc_libh = include_directories ('.')
inc_libh_dep = declare_dependency (include_directories : inc_libh)
-deps = [
+gcalc_deps = [
gio,
namespaceinfo_dep,
inc_libh_dep,
@@ -145,14 +145,14 @@ LT_CURRENT='0'
LT_REVISION='0'
LT_AGE='0'
LT_VERSION='0'
-lib = library(VERSIONED_PROJECT_NAME,
+libgcalc = library(VERSIONED_PROJECT_NAME,
sources,
version : LT_VERSION,
soversion : LT_VERSION+'.'+LT_AGE+'.'+LT_REVISION,
vala_header : PROJECT_NAME+'.h',
vala_vapi : VAPI_NAME,
vala_gir : GIR_NAME,
- dependencies : deps,
+ dependencies : gcalc_deps,
vala_args: [
'--vapidir='+vapi_dir,
'--pkg=mpc',
@@ -171,8 +171,9 @@ lib = library(VERSIONED_PROJECT_NAME,
true
])
+if not get_option('disable-introspection')
g_ir_compiler = find_program('g-ir-compiler', required: false)
-if g_ir_compiler.found() and not get_option('disable-introspection')
+if g_ir_compiler.found()
custom_target('typelib',
command: [
g_ir_compiler,
@@ -181,7 +182,13 @@ custom_target('typelib',
join_paths(meson.current_build_dir(), GIR_NAME)
],
output: TYPELIB_NAME,
- depends: lib,
+ depends: libgcalc,
install: true,
install_dir: join_paths(get_option('libdir'), 'girepository-1.0'))
-endif
\ No newline at end of file
+endif
+endif
+
+libgcalc_dep = declare_dependency(include_directories : inc_libh,
+ link_with : libgcalc,
+ dependencies: gcalc_deps,
+ )
diff --git a/tests/meson.build b/tests/meson.build
index eb459673..24d1d3a3 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -69,7 +69,7 @@ test_parsing_sources = [
test_parsing = executable('gcalc-parsing', test_parsing_sources,
dependencies:tests_deps,
- link_with: [lib, lib_mpfrg],
+ link_with: [libgcalc, lib_mpfrg],
)
test('gcalc-parsing', test_parsing)
@@ -80,6 +80,6 @@ test_solve_basic_sources = [
test_solve_basic = executable('gcalc-solve-basic', test_solve_basic_sources,
dependencies:tests_deps,
- link_with: [lib, lib_mpfrg],
+ link_with: [libgcalc, lib_mpfrg],
)
test('gcalc-solve-basic', test_solve_basic)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]