sourcemod/extensions/sdkhooks/AMBuilder
peace-maker 4320d7b17a
Get sdktools and sdkhooks/dhooks to load on hl2sdk-mock (#1892)
* Build SDKTools for hl2sdk-mock

* Fix loading of extensions using advanced naming scheme for hl2sdk-mock

* Fix error on missing sv_visiblemaxplayers convar

* Build SDKHooks for hl2sdk-mock

* Fix x86_64 SourcePawn VM filename

* SDKHooks: Ignore missing IEntityListeners list in hl2sdk-mock
2022-12-22 18:39:12 +01:00

28 lines
724 B
Python

# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os
project = builder.LibraryProject('sdkhooks.ext')
project.sources += [
'extension.cpp',
'natives.cpp',
'takedamageinfohack.cpp',
'util.cpp',
'../../public/smsdk_ext.cpp'
]
for sdk_name in SM.sdks:
sdk = SM.sdks[sdk_name]
for cxx in builder.targets:
if not cxx.target.arch in sdk.platformSpec[cxx.target.platform]:
continue
binary = SM.HL2ExtConfig(project, builder, cxx, 'sdkhooks.ext.' + sdk.ext, sdk)
binary.compiler.cxxincludes += [
os.path.join(sdk.path, 'game', 'shared')
]
if binary.compiler.behavior == 'gcc':
binary.compiler.cxxflags += ['-Wno-invalid-offsetof']
SM.extensions += builder.Add(project)