diff --git a/src/meson.build b/src/meson.build index 32dab83d5..87f722e1c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -20,13 +20,20 @@ config_file = configure_file( output : 'config.h', configuration : config_cfg) +intel_driver_git_version = intel_vaapi_driver_version if git.found() - git_version = run_command( - git, '--git-dir', join_paths(meson.source_root(), '.git'), - 'describe', '--tags') - intel_driver_git_version = git_version.stdout().strip() -else - intel_driver_git_version = intel_vaapi_driver_version + if meson.version().version_compare('>=0.47.0') + git_version = run_command( + git, '--git-dir', join_paths(meson.source_root(), '.git'), + 'describe', '--tags', check: false) + else + git_version = run_command( + git, '--git-dir', join_paths(meson.source_root(), '.git'), + 'describe', '--tags') + endif + if git_version.returncode() == 0 + intel_driver_git_version = git_version.stdout().strip() + endif endif version_cfg = configuration_data()