[ghex] build: Split versioning scheme for app and lib
- From: Logan Rathbone <larathbone src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ghex] build: Split versioning scheme for app and lib
- Date: Tue, 5 Apr 2022 02:21:49 +0000 (UTC)
commit 2c5dd08e6e7600caf70e6fc283ee6a546f41b7f8
Author: Logan Rathbone <poprocks gmail com>
Date: Sat Apr 2 14:59:14 2022 -0400
build: Split versioning scheme for app and lib
For initial stable release of ghex4, the app will be 42.0 and the
library will be libgtkhex version 4.0.0.
meson.build | 12 ++++++++----
src/meson.build | 13 ++++++++-----
2 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index e2c505c..cdaa07e 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,6 @@
project(
'ghex', 'c',
- version: '4.beta.1',
+ version: '42.0',
meson_version: '>=0.59.0',
license: 'GPL2'
)
@@ -24,7 +24,11 @@ build_gtk_doc = get_option('gtk_doc')
version_arr = meson.project_version().split('.')
ghex_version_major = version_arr[0].to_int()
-libgtkhex_version_major = version_arr[0].to_int()
+# libgtkhex version info
+libgtkhex_api_version = 4
+libgtkhex_version_major = 0
+libgtkhex_version_minor = 0
+libgtkhex_version_micro = 0
ghex_prefix = get_option('prefix')
ghex_libdir = join_paths(ghex_prefix, get_option('libdir'))
@@ -41,7 +45,7 @@ ghex_girdir = join_paths(ghex_datadir, 'gir-1.0')
ghex_typelibdir = join_paths(ghex_libdir, 'girepository-1.0')
ghex_root_dir = include_directories('.')
-ghex_po_dir = join_paths(meson.source_root(), 'po')
+ghex_po_dir = join_paths(meson.project_source_root(), 'po')
# warning cflags
warning_cflags = [
@@ -86,7 +90,7 @@ if buffer_backend == 'mmap'
config_h.set('BACKEND_MMAP', true)
endif
-config_h.set_quoted('LIBGTKHEX_RELEASE_STRING', 'gtkhex-@0@.0'.format(libgtkhex_version_major))
+config_h.set_quoted('LIBGTKHEX_RELEASE_STRING', 'gtkhex-@0@.0'.format(libgtkhex_api_version))
config_h.set('STATIC_HTML_HELP', get_option('static-html-help'))
diff --git a/src/meson.build b/src/meson.build
index f302448..edcddbf 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -31,14 +31,17 @@ libgtkhex_link_args = cc.get_supported_link_arguments([
install_headers(
libgtkhex_headers,
- subdir: 'gtkhex-@0@'.format(libgtkhex_version_major)
+ subdir: 'gtkhex-@0@'.format(libgtkhex_api_version)
)
+osx_current = libgtkhex_version_major + 1
+lib_osx_version = [osx_current, '@0@.@1@'.format(osx_current, libgtkhex_version_minor)]
+
libgtkhex = library(
- 'gtkhex-@0@'.format(libgtkhex_version_major),
+ 'gtkhex-@0@'.format(libgtkhex_api_version),
libgtkhex_sources + libgtkhex_headers,
- version: '0.0.0',
- darwin_versions: ['1', '1.0'],
+ version: '0.@0@.@1@'.format(libgtkhex_version_major, libgtkhex_version_minor),
+ darwin_versions: lib_osx_version,
include_directories: ghex_root_dir,
dependencies: libgtkhex_deps,
c_args: libgtkhex_c_args,
@@ -141,7 +144,7 @@ if generate_gir
gtkhex_gir = gnome.generate_gir(libgtkhex,
sources: gtkhex_gir_sources,
- nsversion: libgtkhex_version_major.to_string(),
+ nsversion: libgtkhex_api_version.to_string(),
namespace: 'Hex',
symbol_prefix: 'hex',
link_with: libgtkhex,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]