From fdfa8f9ba55edb798cc6ae820b8c732b96f31808 Mon Sep 17 00:00:00 2001 From: bigfoot547 Date: Mon, 27 Nov 2023 23:50:21 -0600 Subject: add some scrolling code and debug stuf --- meson.build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'meson.build') 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', '') 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' }) -- cgit v1.2.3-70-g09d2