Fix regression that breaks loading on mcv, blade, and csgo (fixes #2082)
This commit is contained in:
parent
e6a04abc9e
commit
d981e252d2
@ -63,6 +63,7 @@ for sdk_name in SM.sdks:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
binary_name = 'sourcemod.' + sdk.ext
|
binary_name = 'sourcemod.' + sdk.ext
|
||||||
|
needs_protobuf = sdk.name in ['csgo', 'blade', 'mcv']
|
||||||
|
|
||||||
binary = SM.HL2Config(project, builder, cxx, binary_name, sdk)
|
binary = SM.HL2Config(project, builder, cxx, binary_name, sdk)
|
||||||
SM.ConfigureForExtension(builder, binary.compiler)
|
SM.ConfigureForExtension(builder, binary.compiler)
|
||||||
@ -72,7 +73,7 @@ for sdk_name in SM.sdks:
|
|||||||
builder.sourcePath
|
builder.sourcePath
|
||||||
]
|
]
|
||||||
|
|
||||||
if sdk.name in ['csgo', 'blade', 'mcv']:
|
if needs_protobuf:
|
||||||
compiler.cxxincludes += [
|
compiler.cxxincludes += [
|
||||||
os.path.join(sdk.path, 'common', 'protobuf-2.5.0', 'src'),
|
os.path.join(sdk.path, 'common', 'protobuf-2.5.0', 'src'),
|
||||||
os.path.join(sdk.path, 'public', 'engine', 'protobuf'),
|
os.path.join(sdk.path, 'public', 'engine', 'protobuf'),
|
||||||
@ -81,10 +82,12 @@ for sdk_name in SM.sdks:
|
|||||||
|
|
||||||
if compiler.like('msvc'):
|
if compiler.like('msvc'):
|
||||||
compiler.defines += ['_ALLOW_KEYWORD_MACROS']
|
compiler.defines += ['_ALLOW_KEYWORD_MACROS']
|
||||||
|
if needs_protobuf and compiler.like('gcc'):
|
||||||
|
compiler.defines += ['_GLIBCXX_USE_CXX11_ABI=0']
|
||||||
if cxx.target.platform == 'linux':
|
if cxx.target.platform == 'linux':
|
||||||
compiler.postlink += ['-lpthread', '-lrt']
|
compiler.postlink += ['-lpthread', '-lrt']
|
||||||
|
|
||||||
if sdk.name in ['csgo', 'blade', 'mcv']:
|
if needs_protobuf:
|
||||||
if compiler.target.platform == 'linux':
|
if compiler.target.platform == 'linux':
|
||||||
if compiler.target.arch == 'x86':
|
if compiler.target.arch == 'x86':
|
||||||
lib_path = os.path.join(sdk.path, 'lib', 'linux32', 'release', 'libprotobuf.a')
|
lib_path = os.path.join(sdk.path, 'lib', 'linux32', 'release', 'libprotobuf.a')
|
||||||
@ -116,7 +119,7 @@ for sdk_name in SM.sdks:
|
|||||||
lib_path = os.path.join(sdk.path, 'lib', platform, 'release', 'vs' + vs_year, 'libprotobuf.lib')
|
lib_path = os.path.join(sdk.path, 'lib', platform, 'release', 'vs' + vs_year, 'libprotobuf.lib')
|
||||||
compiler.linkflags.insert(0, lib_path)
|
compiler.linkflags.insert(0, lib_path)
|
||||||
|
|
||||||
if sdk.name in ['csgo', 'blade', 'mcv']:
|
if needs_protobuf:
|
||||||
binary.sources += ['smn_protobuf.cpp']
|
binary.sources += ['smn_protobuf.cpp']
|
||||||
else:
|
else:
|
||||||
binary.sources += ['smn_bitbuffer.cpp']
|
binary.sources += ['smn_bitbuffer.cpp']
|
||||||
@ -126,7 +129,7 @@ for sdk_name in SM.sdks:
|
|||||||
'vprof_tool.cpp',
|
'vprof_tool.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
if sdk.name in ['csgo', 'blade', 'mcv']:
|
if needs_protobuf:
|
||||||
binary.sources += [
|
binary.sources += [
|
||||||
os.path.join(sdk.path, 'public', 'engine', 'protobuf', 'netmessages.pb.cc'),
|
os.path.join(sdk.path, 'public', 'engine', 'protobuf', 'netmessages.pb.cc'),
|
||||||
os.path.join(sdk.path, 'public', 'game', 'shared', pb_gamedir_map[sdk.name], 'protobuf', pb_gamesrcdir_map[sdk.name] + '_usermessages.pb.cc'),
|
os.path.join(sdk.path, 'public', 'game', 'shared', pb_gamedir_map[sdk.name], 'protobuf', pb_gamesrcdir_map[sdk.name] + '_usermessages.pb.cc'),
|
||||||
|
Loading…
Reference in New Issue
Block a user