summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-11-21 23:59:01 +0100
committerGitHub <noreply@github.com>2017-11-21 23:59:01 +0100
commitbedcbdd420c20ff37f5afc1b81080fd7b25c2a2f (patch)
tree94d78a0af43166db6b13121cee8999f80bdd2df1 /modules/gdnative
parent817efd0b68f0072c6fbc51ee60dd49fd3bab929e (diff)
parentebf9b80a47f530e3f75e1e69c7ab48cfaf6cf595 (diff)
Merge pull request #13130 from endragor/gdnative-android-export
Proper GDNative export on Android
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/gdnative.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp
index de118043ca..0132ef3c5d 100644
--- a/modules/gdnative/gdnative.cpp
+++ b/modules/gdnative/gdnative.cpp
@@ -123,7 +123,13 @@ bool GDNative::initialize() {
return false;
}
#ifdef IPHONE_ENABLED
+ // on iOS we use static linking
String path = "";
+#elif defined(ANDROID_ENABLED)
+ // On Android dynamic libraries are located separately from resource assets,
+ // we should pass library name to dlopen(). The library name is flattened
+ // during export.
+ String path = lib_path.get_file();
#else
String path = ProjectSettings::get_singleton()->globalize_path(lib_path);
#endif