Set COMPTON_VERSION

This commit is contained in:
Yuxuan Shui 2018-10-16 10:29:52 +01:00
parent 93dd2d92fd
commit f84336a9b7
1 changed files with 3 additions and 0 deletions

View File

@ -2,7 +2,10 @@ project('compton', 'c')
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
version = run_command('git', 'describe').stdout().strip()
add_global_arguments('-std=c11', language: 'c') add_global_arguments('-std=c11', language: 'c')
add_global_arguments('-DCOMPTON_VERSION="'+version+'"', language: 'c')
if get_option('buildtype') == 'release' if get_option('buildtype') == 'release'
add_global_arguments('-DNDEBUG', language: 'c') add_global_arguments('-DNDEBUG', language: 'c')