aboutsummaryrefslogtreecommitdiff
path: root/modules/gdnative/SCsub
diff options
context:
space:
mode:
authorKarroffel2017-08-02 02:46:45 +0200
committerKarroffel2017-08-02 03:50:33 +0200
commit880048377de06c7e34cbfadd68bad2eb3ca17b3d (patch)
tree18d43448cb6ac749b64502d345039a85ded8696c /modules/gdnative/SCsub
parent3a3915b72628dc12e4b79157861ec2ea910c1f31 (diff)
downloadgodot-880048377de06c7e34cbfadd68bad2eb3ca17b3d.tar.gz
godot-880048377de06c7e34cbfadd68bad2eb3ca17b3d.tar.zst
godot-880048377de06c7e34cbfadd68bad2eb3ca17b3d.zip
[GDNative] better header include paths
The old include paths caused some problems on some compilers, for example including "string.h" was ambiguous.
Diffstat (limited to '')
-rw-r--r--modules/gdnative/SCsub15
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index ac13319a1..014c988bd 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -1,14 +1,15 @@
#!/usr/bin/env python
Import('env')
+Import('env_modules')
-env.add_source_files(env.modules_sources, "*.cpp")
-env.add_source_files(env.modules_sources, "godot/*.cpp")
+mod_env = env_modules.Clone()
+mod_env.add_source_files(env.modules_sources, "*.cpp")
+mod_env.add_source_files(env.modules_sources, "godot/*.cpp")
-env.Append(CPPFLAGS=['-DGDAPI_BUILT_IN'])
+mod_env.Append(CPPFLAGS=['-DGDAPI_BUILT_IN'])
+mod_env.Append(CPPPATH=['#modules/gdnative/'])
if "platform" in env and env["platform"] == "x11": # there has to be a better solution?
- env.Append(LINKFLAGS=["-rdynamic"])
-env.use_ptrcall = True
-
-Export('env')
+ mod_env.Append(LINKFLAGS=["-rdynamic"])
+mod_env.use_ptrcall = True