34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
|
|
import os
|
|
|
|
projectName = 'TransmitManager'
|
|
|
|
project = builder.LibraryProject(projectName)
|
|
project.sources += [
|
|
os.path.join(Extension.ext_root, 'src', 'extension.cpp'),
|
|
os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp')
|
|
]
|
|
|
|
for sdk_name in Extension.sdks:
|
|
sdk = Extension.sdks[sdk_name]
|
|
if sdk['name'] in ['mock']:
|
|
continue
|
|
|
|
for cxx in builder.targets:
|
|
if not cxx.target.arch in sdk['platforms'][cxx.target.platform]:
|
|
continue
|
|
|
|
binary = Extension.HL2ExtConfig(project, builder, cxx, projectName + '.ext.' + sdk['extension'], sdk)
|
|
|
|
Extension.AddCDetour(binary)
|
|
|
|
# Silence fatal errors on unrecognized Clang warning flags from CDetour
|
|
if cxx.family in ['gcc', 'clang']:
|
|
binary.compiler.cflags += ['-Wno-unknown-warning-option']
|
|
binary.compiler.cxxflags += ['-Wno-unknown-warning-option']
|
|
|
|
if cxx.target.platform in ['windows']:
|
|
binary.compiler.postlink += [ 'legacy_stdio_definitions.lib' ]
|
|
|
|
Extension.extensions += builder.Add(project)
|