|
|
@@ -11,12 +11,17 @@ sources = files(
|
|
|
'Module.vala'
|
|
|
)
|
|
|
|
|
|
-library_version = meson.project_version()
|
|
|
-libinversion = shared_library('inversion-@0@'.format(library_version),
|
|
|
+# The API version rides every artifact name (libinversion-0.1.so,
|
|
|
+# inversion-0.1.vapi, ...); the project version is the release version and
|
|
|
+# only reaches the pkg-config Version: field (usm checks it against the
|
|
|
+# manifest version).
|
|
|
+api_version = '0.1'
|
|
|
+release_version = meson.project_version()
|
|
|
+libinversion = shared_library('inversion-@0@'.format(api_version),
|
|
|
sources,
|
|
|
dependencies: [glib_dep, gobject_dep, invercargill_dep],
|
|
|
install: true,
|
|
|
- vala_gir: 'inversion-@0@.gir'.format(library_version),
|
|
|
+ vala_gir: 'inversion-@0@.gir'.format(api_version),
|
|
|
install_dir: [true, true, true, true]
|
|
|
)
|
|
|
|
|
|
@@ -29,12 +34,12 @@ inversion_dep = declare_dependency(
|
|
|
|
|
|
pkg = import('pkgconfig')
|
|
|
pkg.generate(libinversion,
|
|
|
- version : library_version,
|
|
|
- name : 'inversion-@0@'.format(library_version))
|
|
|
-
|
|
|
+ version : release_version,
|
|
|
+ name : 'inversion-@0@'.format(api_version))
|
|
|
+
|
|
|
g_ir_compiler = find_program('g-ir-compiler')
|
|
|
-custom_target('inversion typelib', command: [g_ir_compiler, '--shared-library=libinversion-@0@.so'.format(library_version), '--output', '@OUTPUT@', meson.current_build_dir() / 'inversion-@0@.gir'.format(library_version)],
|
|
|
- output: 'inversion-@0@.typelib'.format(library_version),
|
|
|
+custom_target('inversion typelib', command: [g_ir_compiler, '--shared-library=libinversion-@0@.so'.format(api_version), '--output', '@OUTPUT@', meson.current_build_dir() / 'inversion-@0@.gir'.format(api_version)],
|
|
|
+ output: 'inversion-@0@.typelib'.format(api_version),
|
|
|
depends: libinversion,
|
|
|
install: true,
|
|
|
install_dir: get_option('libdir') / 'girepository-1.0')
|