/
wscript
60 lines (48 loc) · 2.42 KB
/
wscript
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from waflib.TaskGen import feature
@feature('copy_portaudio')
def feature_copy_portaudio(self):
platform = self.bld.env['PLATFORM']
configuration = self.bld.env['CONFIGURATION']
#for the windows platform
if platform == 'win_x64' or platform == 'win_x64_vs2015' or platform == 'win_x64_vs2013':
output_folder = self.bld.get_output_folders(platform, configuration)[0]
#copy libsamplerate
sample_source_file = self.bld.CreateRootRelativePath('Gems/' + self.name + '/3rdParty/libsamplerate/bin/libsamplerate-0.dll')
self.create_task('copy_outputs', self.bld.root.make_node(sample_source_file), output_folder.make_node('libsamplerate-0.dll'))
#depending on the configuration, copy portaudio
if configuration == 'debug' or configuration == 'profile':
port_source_file = self.bld.CreateRootRelativePath('Gems/' + self.name + '/3rdParty/portaudio/bin/Debug/portaudio_x64.dll')
self.create_task('copy_outputs', self.bld.root.make_node(port_source_file), output_folder.make_node('portaudio_x64.dll'))
else:
port_source_file = self.bld.CreateRootRelativePath('Gems/' + self.name + '/3rdParty/portaudio/bin/Release/portaudio_x64.dll')
self.create_task('copy_outputs', self.bld.root.make_node(port_source_file), output_folder.make_node('portaudio_x64.dll'))
def build(bld):
bld.DefineGem(
# Add custom build options here
features = [ 'copy_portaudio' ],
includes = [
bld.Path('Code/CryEngine/CryAction'),
bld.path.abspath() + '/../3rdParty/portaudio/include',
bld.path.abspath() + '/../3rdParty/libsamplerate/include'
],
lib = [
'portaudio_x64',
'libsamplerate-0'
],
libpath = [
bld.path.abspath() + '/../3rdParty/libsamplerate/lib'
],
debug_libpath = [
bld.path.abspath() + '/../3rdParty/portaudio/lib/Debug'
],
profile_libpath = [
bld.path.abspath() + '/../3rdParty/portaudio/lib/Debug'
],
performance_libpath = [
bld.path.abspath() + '/../3rdParty/portaudio/lib/Release'
],
release_libpath = [
bld.path.abspath() + '/../3rdParty/portaudio/lib/Release'
],
win_features = ['crcfix']
)