summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorMohammed Sadiq <sadiq@sadiqpk.org>2018-09-01 21:02:47 +0530
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2018-09-02 02:24:04 +0000
commitcef94b4459fed5d064227413ed1c96b0b8a759f0 (patch)
treea9d886d1456a788194a8f24188460cac2cd7efba /meson.build
parent9ffdd3dc217ced3d587346cf3869364336cc0129 (diff)
downloadgnome-todo-cef94b4459fed5d064227413ed1c96b0b8a759f0.tar.gz
build: Simplify setting version from git tag
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 10 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index a674e96f..05b08ed9 100644
--- a/meson.build
+++ b/meson.build
@@ -61,8 +61,8 @@ set_defines = [
['PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), gnome_todo_version)],
['PACKAGE_TARNAME', meson.project_name()],
['PACKAGE_URL', 'https://wiki.gnome.org/Apps/Todo'],
- ['PACKAGE_VERSION', gnome_todo_version],
- ['VERSION', gnome_todo_version],
+ ['PACKAGE_VERSION', '@VCS_TAG@'],
+ ['VERSION', '@VCS_TAG@'],
# i18n
['GETTEXT_PACKAGE', meson.project_name()]
]
@@ -143,6 +143,14 @@ gnome_todo_deps = [
cc.find_library('m', required: true)
]
+vcs_identifier_h = vcs_tag(
+ input: configure_file(
+ output: 'config.h.in',
+ configuration: config_h
+ ),
+ output: 'config.h',
+)
+
configure_file(
output: 'config.h',
configuration: config_h