summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-28 13:29:52 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-09-28 14:07:39 +0200
commit3a2ca68af3c8bafe9f60f09bd8fece894fe3a925 (patch)
treec33aa8ccee82b26d868fbc91abed94e2480864c2 /platform
parent243bdc4524ddcf8ac6bef03c378e14fe7bb263b8 (diff)
SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs, Export should only be used when exporting *new* objects.
Diffstat (limited to 'platform')
-rw-r--r--platform/SCsub2
-rw-r--r--platform/android/SCsub10
-rw-r--r--platform/iphone/SCsub3
-rw-r--r--platform/osx/SCsub2
-rw-r--r--platform/server/SCsub2
-rw-r--r--platform/windows/SCsub4
-rw-r--r--platform/x11/SCsub2
7 files changed, 8 insertions, 17 deletions
diff --git a/platform/SCsub b/platform/SCsub
index 0f9c2047a0..aa83154ee0 100644
--- a/platform/SCsub
+++ b/platform/SCsub
@@ -29,5 +29,3 @@ platform_sources.append('register_platform_apis.gen.cpp')
lib = env.add_library('platform', platform_sources)
env.Prepend(LIBS=lib)
-
-Export('env')
diff --git a/platform/android/SCsub b/platform/android/SCsub
index 31fee5722c..807506000f 100644
--- a/platform/android/SCsub
+++ b/platform/android/SCsub
@@ -1,12 +1,12 @@
#!/usr/bin/env python
+Import('env')
+
import shutil
from compat import open_utf8
from distutils.version import LooseVersion
from detect import get_ndk_version
-Import('env')
-
android_files = [
'os_android.cpp',
@@ -26,10 +26,6 @@ android_files = [
# 'power_android.cpp'
]
-# env.Depends('#core/math/vector3.h', 'vector3_psp.h')
-
-#obj = env.SharedObject('godot_android.cpp')
-
env_android = env.Clone()
if env['target'] == "profile":
env_android.Append(CPPFLAGS=['-DPROFILER_ENABLED'])
@@ -174,4 +170,4 @@ if lib_arch_dir != '':
ndk_version = get_ndk_version(env["ANDROID_NDK_ROOT"])
if ndk_version != None and LooseVersion(ndk_version) >= LooseVersion("15.0.4075724"):
stl_lib_path = str(env['ANDROID_NDK_ROOT']) + '/sources/cxx-stl/llvm-libc++/libs/' + lib_arch_dir + '/libc++_shared.so'
- env_android.Command(out_dir + '/libc++_shared.so', stl_lib_path, Copy("$TARGET", "$SOURCE")) \ No newline at end of file
+ env_android.Command(out_dir + '/libc++_shared.so', stl_lib_path, Copy("$TARGET", "$SOURCE"))
diff --git a/platform/iphone/SCsub b/platform/iphone/SCsub
index b96bec16b4..debf051eda 100644
--- a/platform/iphone/SCsub
+++ b/platform/iphone/SCsub
@@ -1,8 +1,9 @@
#!/usr/bin/env python
-import os
Import('env')
+import os
+
iphone_lib = [
'godot_iphone.cpp',
'os_iphone.cpp',
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
index 5c973c30c2..dc407eee9e 100644
--- a/platform/osx/SCsub
+++ b/platform/osx/SCsub
@@ -1,8 +1,8 @@
#!/usr/bin/env python
-import os
Import('env')
+import os
from platform_methods import run_in_subprocess
import platform_osx_builders
diff --git a/platform/server/SCsub b/platform/server/SCsub
index 0788ad75ae..c9082f9b3a 100644
--- a/platform/server/SCsub
+++ b/platform/server/SCsub
@@ -2,11 +2,9 @@
Import('env')
-
common_server = [\
"os_server.cpp",\
"#platform/x11/crash_handler_x11.cpp",
"#platform/x11/power_x11.cpp",
]
-
prog = env.add_program('#bin/godot_server', ['godot_server.cpp'] + common_server)
diff --git a/platform/windows/SCsub b/platform/windows/SCsub
index 5dfb1592e0..e07d373c4b 100644
--- a/platform/windows/SCsub
+++ b/platform/windows/SCsub
@@ -1,8 +1,8 @@
#!/usr/bin/env python
-import os
Import('env')
+import os
from platform_methods import run_in_subprocess
import platform_windows_builders
@@ -19,9 +19,7 @@ common_win = [
]
res_file = 'godot_res.rc'
-
res_target = "godot_res" + env["OBJSUFFIX"]
-
res_obj = env.RES(res_target, res_file)
prog = env.add_program('#bin/godot', common_win + res_obj, PROGSUFFIX=env["PROGSUFFIX"])
diff --git a/platform/x11/SCsub b/platform/x11/SCsub
index d3901eb798..97d3d1b514 100644
--- a/platform/x11/SCsub
+++ b/platform/x11/SCsub
@@ -1,8 +1,8 @@
#!/usr/bin/env python
-import os
Import('env')
+import os
from platform_methods import run_in_subprocess
import platform_x11_builders