wscript: move gitversion load to libpublic, define XASH_BUILD_BRANCH, use unknown-{commit,branch} if detecting git version was failed

This commit is contained in:
Alibek Omarov 2024-03-19 19:30:52 +03:00
parent effeba2f44
commit aab1fa1ba2
2 changed files with 4 additions and 2 deletions

View File

@ -12,7 +12,9 @@ def options(opt):
return
def configure(conf):
conf.define('XASH_BUILD_COMMIT', conf.env.GIT_VERSION if conf.env.GIT_VERSION else 'notset')
conf.load('gitversion')
conf.define('XASH_BUILD_COMMIT', conf.env.GIT_VERSION if conf.env.GIT_VERSION else 'unknown-commit')
conf.define('XASH_BUILD_BRANCH', conf.env.GIT_BRANCH if conf.env.GIT_BRANCH else 'unknown-branch')
def build(bld):
bld(name = 'sdk_includes', export_includes = '. ../common ../pm_shared ../engine')

View File

@ -181,7 +181,7 @@ def configure(conf):
if conf.env.COMPILER_CC == 'msvc':
conf.load('msvc_pdb')
conf.load('msvs msdev subproject gitversion clang_compilation_database strip_on_install waf_unit_test enforce_pic cmake')
conf.load('msvs msdev subproject clang_compilation_database strip_on_install waf_unit_test enforce_pic cmake')
# Force XP compatibility, all build targets should add subsystem=bld.env.MSVC_SUBSYSTEM
if conf.env.MSVC_TARGETS[0] == 'x86':