Commit 4aec2b43 authored by Daniel Espinosa Ortiz's avatar Daniel Espinosa Ortiz

GCalc: added configuration to be used as meson subproject

parent 1b86e778
Pipeline #87028 canceled with stages
in 12 minutes and 4 seconds
......@@ -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,
)
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment