c_defines += ['-DNDEBUG']
endif
-git_tags_cmd = run_command('git', 'describe', '--tags', check: false)
-git_hash_cmd = run_command('git', 'rev-parse', '--short', 'HEAD', check: false)
-if git_tags_cmd.returncode() == 0 and git_hash_cmd.returncode() == 0
+git = find_program('git', required: false)
+if git.found()
+ git_tags_cmd = run_command(git, 'describe', '--tags', check: false)
+ git_hash_cmd = run_command(git, 'rev-parse', '--short', 'HEAD', check: false)
+ if git_tags_cmd.returncode() == 0 and git_hash_cmd.returncode() == 0
git_tags = git_tags_cmd.stdout().strip()
git_hash = git_hash_cmd.stdout().strip()
defines += ['-DJACKTRIP_BUILD_INFO=' + git_tags + '-' + git_hash]
+ endif
endif
src = [ 'src/DataProtocol.cpp',