commit
a48a9217e4
5 changed files with 48 additions and 2 deletions
@ -0,0 +1,29 @@ |
||||
#pragma once |
||||
|
||||
/**
|
||||
* SECTION:version |
||||
* @section_id: foo-version |
||||
* @short_description: <filename>foo-version.h</filename> |
||||
* @title: Foo Versioning |
||||
*/ |
||||
|
||||
/**
|
||||
* FOO_MAJOR_VERSION: |
||||
* |
||||
* The major version of foo. |
||||
*/ |
||||
#define FOO_MAJOR_VERSION (@FOO_MAJOR_VERSION@) |
||||
|
||||
/**
|
||||
* FOO_MINOR_VERSION: |
||||
* |
||||
* The minor version of foo. |
||||
*/ |
||||
#define FOO_MINOR_VERSION (@FOO_MINOR_VERSION@) |
||||
|
||||
/**
|
||||
* FOO_MICRO_VERSION: |
||||
* |
||||
* The micro version of foo. |
||||
*/ |
||||
#define FOO_MICRO_VERSION (@FOO_MICRO_VERSION@) |
@ -0,0 +1,10 @@ |
||||
cdata = configuration_data() |
||||
parts = meson.project_version().split('.') |
||||
cdata.set('FOO_MAJOR_VERSION', parts[0]) |
||||
cdata.set('FOO_MINOR_VERSION', parts[1]) |
||||
cdata.set('FOO_MICRO_VERSION', parts[2]) |
||||
configure_file(input : 'foo-version.h.in', |
||||
output : 'foo-version.h', |
||||
configuration : cdata, |
||||
install : true, |
||||
install_dir : get_option('includedir')) |
Loading…
Reference in new issue