mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-07 10:28:30 +00:00
Improve s2_sample_mm build script
Now it's possible to use run-time variables to compute the target paths/defines for includes/libs/defines
This commit is contained in:
parent
bc36e072a1
commit
6b8ae69227
@ -1,19 +1,26 @@
|
|||||||
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
||||||
import os, sys
|
import os, sys
|
||||||
|
|
||||||
additional_libs = [
|
# Edit the functions below for the extra functionality, the return should be
|
||||||
# Path should be relative either to hl2sdk folder or to build folder
|
# a list of path's to wanted locations
|
||||||
#'path/to/lib/example.lib',
|
def additional_libs(context, binary, sdk):
|
||||||
]
|
return [
|
||||||
|
# Path should be relative either to hl2sdk folder or to build folder
|
||||||
|
# 'path/to/lib/example.lib',
|
||||||
|
]
|
||||||
|
|
||||||
additional_defines = [
|
def additional_defines(context, binary, sdk):
|
||||||
#'EXAMPLE_DEFINE=2'
|
return [
|
||||||
]
|
# 'EXAMPLE_DEFINE=2'
|
||||||
|
]
|
||||||
|
|
||||||
additional_includes = [
|
def additional_includes(context, binary, sdk):
|
||||||
# Path should be absolute only!
|
return [
|
||||||
#'D:/absolute/path/to/include/folder/'
|
# Path should be absolute only!
|
||||||
]
|
# os.path.join(sdk['path'], 'game', 'server'),
|
||||||
|
# os.path.join(sdk['path'], 'public', 'entity2'),
|
||||||
|
# 'D:/absolute/path/to/include/folder/'
|
||||||
|
]
|
||||||
|
|
||||||
def ResolveEnvPath(env, folder):
|
def ResolveEnvPath(env, folder):
|
||||||
if env in os.environ:
|
if env in os.environ:
|
||||||
@ -286,9 +293,9 @@ class MMSPluginConfig(object):
|
|||||||
|
|
||||||
SdkHelpers.configureCxx(context, binary, sdk)
|
SdkHelpers.configureCxx(context, binary, sdk)
|
||||||
|
|
||||||
cxx.linkflags += additional_libs
|
cxx.linkflags += additional_libs(context, binary, sdk)
|
||||||
cxx.defines += additional_defines
|
cxx.defines += additional_defines(context, binary, sdk)
|
||||||
cxx.cxxincludes += additional_includes
|
cxx.cxxincludes += additional_includes(context, binary, sdk)
|
||||||
|
|
||||||
return binary
|
return binary
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user