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')