1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-25 14:52:19 +01:00
GAMMACASE 62dd3dd4fa
Fix Source2 linux packaging layout (#120)
* Fix linux packaging layout
* Split binary layouts per sdk
2023-09-28 19:42:30 -07:00

46 lines
1.3 KiB
Python

# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os
for sdk_name in MMS.sdks:
for cxx in MMS.all_targets:
sdk = MMS.sdks[sdk_name]
if not cxx.target.arch in sdk.platformSpec[cxx.target.platform]:
continue
name = 'metamod.' + sdk.ext
binary = MMS.HL2Library(builder, cxx, name, sdk)
binary.sources += [
'metamod.cpp',
'metamod_console.cpp',
'metamod_oslink.cpp',
'metamod_plugins.cpp',
'metamod_util.cpp',
'provider/provider_base.cpp',
'sourcehook/sourcehook.cpp',
'sourcehook/sourcehook_impl_chookidman.cpp',
'sourcehook/sourcehook_impl_chookmaninfo.cpp',
'sourcehook/sourcehook_impl_cproto.cpp',
'sourcehook/sourcehook_impl_cvfnptr.cpp',
'gamedll_bridge.cpp'
]
if sdk_name in ['dota', 'cs2']:
binary.sources += [
'provider/source2/provider_source2.cpp',
os.path.join(sdk.path, 'tier1', 'convar.cpp'),
os.path.join(sdk.path, 'public', 'tier0', 'memoverride.cpp')
]
else:
binary.sources += [
'provider/source/provider_source.cpp',
'provider/source/provider_source_console.cpp',
'vsp_bridge.cpp'
]
if cxx.target.arch == 'x86':
binary.sources += ['sourcehook/sourcehook_hookmangen.cpp']
nodes = builder.Add(binary)
MMS.binaries += [nodes]