build: meson.build minor code refactoring
This commit is contained in:
parent
e43743e0eb
commit
48ee6a1a72
1 changed files with 6 additions and 5 deletions
11
meson.build
11
meson.build
|
|
@ -15,11 +15,6 @@ conf = configuration_data()
|
|||
|
||||
warnings = []
|
||||
|
||||
# git-version.h is already present and not generated if dist tarball
|
||||
is_git_repository = run_command('python3', '-c',
|
||||
'import sys,os; sys.exit(0 if os.path.exists(".git") else 1)'
|
||||
).returncode() == 0
|
||||
|
||||
################################################################################
|
||||
# Project info
|
||||
|
||||
|
|
@ -1446,9 +1441,15 @@ endif
|
|||
##### #### # # # # #### # # ###### ###### ####
|
||||
|
||||
|
||||
# git-version.h is already present and not generated if dist tarball
|
||||
is_git_repository = run_command('python3', '-c',
|
||||
'import sys,os; sys.exit(0 if os.path.exists(".git") else 1)'
|
||||
).returncode() == 0
|
||||
|
||||
has_version_h = run_command('python3', '-c',
|
||||
'import sys,os; sys.exit(0 if os.path.exists("git-version.h") else 1)'
|
||||
).returncode() == 0
|
||||
|
||||
if is_git_repository or not has_version_h
|
||||
gitversion_h1 = vcs_tag(
|
||||
input : 'app/git-version.h.in',
|
||||
|
|
|
|||
Loading…
Reference in a new issue