Fixed issues 2496. Used option 4: parse_version.cmake to avoid python3 usage.

https://github.com/KhronosGroup/glslang/issues/2496
This commit is contained in:
Evgeny Proydakov
2021-02-07 15:37:03 +03:00
parent 386b4fcb28
commit 05798c17fb
4 changed files with 64 additions and 43 deletions

View File

@@ -201,13 +201,13 @@ def main():
software_version = deduce_software_version(directory)
commit = describe(directory)
output = template \
.replace("<major>", software_version["major"]) \
.replace("<minor>", software_version["minor"]) \
.replace("<patch>", software_version["patch"]) \
.replace("<flavor>", software_version["flavor"]) \
.replace("<-flavor>", software_version["-flavor"]) \
.replace("<date>", software_version["date"]) \
.replace("<commit>", commit)
.replace("@major@", software_version["major"]) \
.replace("@minor@", software_version["minor"]) \
.replace("@patch@", software_version["patch"]) \
.replace("@flavor@", software_version["flavor"]) \
.replace("@-flavor@", software_version["-flavor"]) \
.replace("@date@", software_version["date"]) \
.replace("@commit@", commit)
if output_file is None:
print(output)