sm-ext-PhysHooks/AMBuilder

37 lines
845 B
Plaintext
Raw Normal View History

2019-12-18 12:04:10 +01:00
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
2025-02-22 17:51:03 +01:00
import os
if not "SM" in globals():
SM = Extension
2019-12-18 12:04:10 +01:00
projectName = 'PhysHooks'
2025-02-22 17:51:03 +01:00
project = builder.LibraryProject(projectName)
2019-12-18 12:04:10 +01:00
project.sources += [
'extension.cpp',
2025-02-22 17:51:03 +01:00
os.path.join(SM.sm_root, 'public', 'smsdk_ext.cpp')
2019-12-18 12:04:10 +01:00
]
2025-02-22 17:51:03 +01:00
for sdk_name in SM.sdks:
sdk = SM.sdks[sdk_name]
if sdk['name'] in ['mock']:
continue
for cxx in builder.targets:
cxx.defines += ['HAVE_STRING_H'];
if not cxx.target.arch in sdk['platforms'][cxx.target.platform]:
continue
binary = Extension.HL2ExtConfig(project, builder, cxx, projectName + '.ext.' + sdk['extension'], sdk)
SM.AddCDetour(binary)
binary.compiler.cxxflags += [
'-Wno-dangling-else',
'-Wno-unknown-pragmas',
'-Wno-unused-result',
'-Wno-sign-compare',
]
2019-12-18 12:04:10 +01:00
2025-02-22 17:51:03 +01:00
SM.extensions += builder.Add(project)