public: exclude build_vcs from libpublic dependencies, add it per project

This commit is contained in:
Alibek Omarov
2026-02-23 21:48:23 +05:00
parent 382b19e458
commit 2bdc22fbeb
5 changed files with 15 additions and 22 deletions

View File

@@ -199,7 +199,7 @@ def build(bld):
# public includes for renderers and utils use
bld(name = 'engine_includes', export_includes = '. common common/imagelib', use = 'filesystem_includes')
libs = ['engine_includes', 'public', 'werror', 'backtrace', 'library_suffix']
libs = ['engine_includes', 'public', 'werror', 'backtrace', 'library_suffix', 'build_vcs']
includes = ['server', 'client', 'client/vgui', 'common/soundlib', 'platform']
# basic build: dedicated only

View File

@@ -37,7 +37,7 @@ def build(bld):
# on PSVita do not link any libraries that are already in the main executable, but add the includes target
if bld.env.DEST_OS != 'psvita':
libs += [ 'public', 'ANDROID', 'library_suffix' ]
libs += [ 'public', 'ANDROID', 'library_suffix', 'build_vcs' ]
bld.shlib(target = 'filesystem_stdio',
features = 'seq',

View File

@@ -60,19 +60,3 @@ int Q_buildnum( void )
return b;
}
/*
=============
Q_buildnum_compat
Returns a Xash3D build number. This is left for compability with original Xash3D.
IMPORTANT: this value must be changed ONLY after updating to newer Xash3D base
IMPORTANT: this value must be acquired through "build" cvar.
=============
*/
int Q_buildnum_compat( void )
{
// do not touch this! Only author of Xash3D can increase buildnumbers!
return 4529;
}

View File

@@ -55,14 +55,23 @@ enum
//
// build.c
//
int Q_buildnum( void );
int Q_buildnum_iso( const char *date );
int Q_buildnum_compat( void );
// to use build information, add "build_vcs" to dependencies
int Q_buildnum( void );
extern const char *g_buildcommit;
extern const char *g_buildbranch;
extern const char *g_build_date;
extern const char *g_buildcommit_date;
static inline int Q_buildnum_compat( void )
{
// this magical number below is Xash3D base build number
// as Xash3D isn't in development anymore,
// it's probably gonna stay at this number forever
return 4529;
}
//
// crtlib.c
//

View File

@@ -146,7 +146,7 @@ def build(bld):
bld.stlib(source = bld.path.ant_glob('*.c', excl='build_vcs.c'),
target = 'public',
use = 'sdk_includes werror build_vcs')
use = 'sdk_includes werror')
if bld.env.TESTS:
tests = {