Tiny clean up of meson.build

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2018-12-15 16:40:00 +00:00
parent b5d135df82
commit c2c16fb8a1
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 4 additions and 6 deletions

View File

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