forked from GodotSteam/GodotSteam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SCsub
42 lines (35 loc) · 1.32 KB
/
SCsub
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
# SCsub
Import('env')
module_path = Dir('.').srcnode().abspath
env.Append(CPPPATH=["%s/sdk/public/" % module_path])
# If compiling Linux
if env["platform"]== "linuxbsd" or env["platform"] == "server":
env.Append(LIBS=["steam_api"])
env.Append(RPATH=env.Literal('\\$$ORIGIN'))
if env['arch'] == "x86_32":
env.Append(LIBPATH=["%s/sdk/redistributable_bin/linux32" % module_path])
else: # 64 bit
env.Append(LIBPATH=["%s/sdk/redistributable_bin/linux64" % module_path])
# If compiling Windows
elif env["platform"] == "windows":
# Mostly VisualStudio
if env["CC"] == "cl":
if env['arch'] == "x86_32":
env.Append(LINKFLAGS=["steam_api.lib"])
env.Append(LIBPATH=["%s/sdk/redistributable_bin" % module_path])
else: # 64 bit
env.Append(LINKFLAGS=["steam_api64.lib"])
env.Append(LIBPATH=["%s/sdk/redistributable_bin/win64" % module_path])
# Mostly "GCC"
else:
if env['arch'] == "x86_32":
env.Append(LIBS=["steam_api"])
env.Append(LIBPATH=["%s/sdk/redistributable_bin" % module_path])
else: # 64 bit
env.Append(LIBS=["steam_api64"])
env.Append(LIBPATH=["%s/sdk/redistributable_bin/win64" % module_path])
# If compiling OSX
elif env["platform"] == "macos":
env.Append(LIBS=["steam_api"])
env.Append(LIBPATH=['%s/sdk/redistributable_bin/osx' % module_path])
env.add_source_files(env.modules_sources,"*.cpp")