-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAMBuilder
More file actions
39 lines (28 loc) · 1.13 KB
/
AMBuilder
File metadata and controls
39 lines (28 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os, sys
projectName = 'loadsoundscript'
# smsdk_ext.cpp will be automatically added later
sourceFiles = [
'src/extension.cpp',
'src/soundscript.cpp',
]
###############
# Make sure to edit PackageScript, which copies your files to their appropriate locations
# Simple extensions do not need to modify past this point.
project = builder.LibraryProject(projectName)
if os.path.isfile(os.path.join(builder.currentSourcePath, 'sdk', 'smsdk_ext.cpp')):
# Use the copy included in the project
project.sources += [os.path.join('sdk', 'smsdk_ext.cpp')]
else:
# Use the copy included with SM 1.6 and newer
project.sources += [os.path.join(Extension.sm_root, 'public', 'smsdk_ext.cpp')]
project.sources += sourceFiles
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.extensions += builder.Add(project)