diff options
author | David Robillard <d@drobilla.net> | 2021-08-08 13:47:10 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | b739848b6ea4c038610ceb7c0b00984a86d99fa9 (patch) | |
tree | 29010c4a34d6800d2f706e0fe93eb297f12bf4bc /meson.build | |
parent | cd3d9986f40fd4e605ac2e8168512065439173e2 (diff) | |
download | serd-b739848b6ea4c038610ceb7c0b00984a86d99fa9.tar.gz serd-b739848b6ea4c038610ceb7c0b00984a86d99fa9.tar.bz2 serd-b739848b6ea4c038610ceb7c0b00984a86d99fa9.zip |
Add version constants to public header
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 14abaa0b..30ac2374 100644 --- a/meson.build +++ b/meson.build @@ -16,9 +16,11 @@ project( version: '1.1.1', ) +serd_major_version = meson.project_version().split('.')[0] +serd_minor_version = meson.project_version().split('.')[1] +serd_micro_version = meson.project_version().split('.')[2] serd_src_root = meson.current_source_dir() -major_version = meson.project_version().split('.')[0] -version_suffix = '-@0@'.format(major_version) +version_suffix = '-@0@'.format(serd_major_version) versioned_name = 'serd' + version_suffix ####################### @@ -119,6 +121,7 @@ c_headers = files( 'include/serd/string_view.h', 'include/serd/syntax.h', 'include/serd/uri.h', + 'include/serd/version.h', 'include/serd/writer.h', ) @@ -147,6 +150,9 @@ libserd = library( sources, c_args: [ '-DSERD_INTERNAL', + '-DSERD_MAJOR_VERSION=@0@'.format(serd_major_version), + '-DSERD_MICRO_VERSION=@0@'.format(serd_micro_version), + '-DSERD_MINOR_VERSION=@0@'.format(serd_minor_version), '-DSERD_VERSION="@0@"'.format(meson.project_version()), ] + c_suppressions + extra_c_args + platform_c_args, dependencies: m_dep, |