diff options
| author | 2023-11-27 23:50:21 -0600 | |
|---|---|---|
| committer | 2023-11-27 23:50:21 -0600 | |
| commit | fdfa8f9ba55edb798cc6ae820b8c732b96f31808 (patch) | |
| tree | 7e489d43851be8872c687022d7362c97128b725a /meson.build | |
| parent | add key handling and some other stuff (diff) | |
add some scrolling code and debug stuf
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 134a16f..4951e76 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,18 @@ project('umps', 'c') +git_program = find_program('git', required : false) +if git_program.found() + res = run_command(['git', 'describe', '--dirty=-dirty', '--always'], check : true, capture : true) + + # trim version string down so it won't ever be too large for the UI + prog_version = res.stdout().strip().substring(0, 48) + + message('Found version string', prog_version) +else + prog_version = '???' + message('Git not found. Falling back to version', prog_version) +endif + conf_data = configuration_data() opt_ncurses_narrow = get_option('ncurses_narrow') @@ -25,6 +38,9 @@ else conf_data.set('NCURSES_INCLUDE', '<ncurses.h>') endif +conf_data.set_quoted('UMPS_VERSION', prog_version) +conf_data.set_quoted('UMPS_NAME', 'UMPS') + subdir('src') executable('umps', umps_srcs, dependencies : [curses_dep], include_directories : umps_config_inc, override_options : {'b_ndebug' : 'if-release', 'c_std' : 'c99' }) |
