meson.build: Only depend on git if the profile is development

Git is only needed for getting the short sha to append to
the version string in the development version of the application.
And as such it shouldn't be required for normal builds.
This commit is contained in:
Jordan Petridis
2019-10-01 11:05:49 +03:00
parent 5d87a8459d
commit af91bd62bb
+2 -1
View File
@@ -34,8 +34,9 @@ calendar_schemadir = join_paths(calendar_datadir, 'glib-2.0', 'schemas')
# Options #
###########
rev_txt = run_command('git','rev-parse','--short','HEAD').stdout().strip()
if get_option('profile') == 'development'
find_program('git')
rev_txt = run_command('git','rev-parse','--short','HEAD').stdout().strip()
profile = 'Devel'
name_suffix = ' (Development)'
rev = '-@0@'.format(rev_txt)