Fixed SM ambuild config failure at TF2 ext if ep2v sdk is missing (bug 5608, r=psychonic).
This commit is contained in:
parent
8950a693db
commit
f2d54b7728
@ -1,16 +1,16 @@
|
|||||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||||
import os
|
import os
|
||||||
|
if 'ep2v' in SM.sdkInfo:
|
||||||
sdk = SM.sdkInfo['ep2v']
|
sdk = SM.sdkInfo['ep2v']
|
||||||
compiler = SM.DefaultHL2Compiler('extensions/tf2', 'ep2v')
|
compiler = SM.DefaultHL2Compiler('extensions/tf2', 'ep2v')
|
||||||
if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
|
if compiler.cc.name == 'gcc' or compiler.cc.name == 'clang':
|
||||||
compiler['CFLAGS'].append('-Wno-parentheses')
|
compiler['CFLAGS'].append('-Wno-parentheses')
|
||||||
|
|
||||||
name = 'game.tf2.ext.' + sdk['ext']
|
name = 'game.tf2.ext.' + sdk['ext']
|
||||||
extension = AMBuild.AddJob(name)
|
extension = AMBuild.AddJob(name)
|
||||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||||
SM.PreSetupHL2Job(extension, binary, 'ep2v')
|
SM.PreSetupHL2Job(extension, binary, 'ep2v')
|
||||||
binary.AddSourceFiles('extensions/tf2', [
|
binary.AddSourceFiles('extensions/tf2', [
|
||||||
'extension.cpp',
|
'extension.cpp',
|
||||||
'natives.cpp',
|
'natives.cpp',
|
||||||
'RegNatives.cpp',
|
'RegNatives.cpp',
|
||||||
@ -24,7 +24,7 @@ binary.AddSourceFiles('extensions/tf2', [
|
|||||||
'sdk/smsdk_ext.cpp',
|
'sdk/smsdk_ext.cpp',
|
||||||
'asm/asm.c'
|
'asm/asm.c'
|
||||||
])
|
])
|
||||||
SM.PostSetupHL2Job(extension, binary, 'ep2v')
|
SM.PostSetupHL2Job(extension, binary, 'ep2v')
|
||||||
SM.AutoVersion('extensions/tf2', binary)
|
SM.AutoVersion('extensions/tf2', binary)
|
||||||
binary.SendToJob()
|
binary.SendToJob()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user