From c2c16fb8a161e4f13c5357ff4c3fcac3efdca847 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 15 Dec 2018 16:40:00 +0000 Subject: [PATCH] Tiny clean up of meson.build Signed-off-by: Yuxuan Shui --- meson.build | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 2db0eb3..3cf8b29 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,10 @@ project('compton', 'c', version: '4') cc = meson.get_compiler('c') -version = '' +# use project version by default +version = 'v'+meson.project_version() + +# use git describe if that's available git = find_program('git', required: false) if git.found() gitv = run_command('git', 'describe') @@ -11,11 +14,6 @@ if git.found() endif endif -if version == '' - # use project version by default - version = 'v'+meson.project_version() -endif - add_global_arguments('-std=c11', language: 'c') add_global_arguments('-DCOMPTON_VERSION="'+version+'"', language: 'c')