aboutsummaryrefslogtreecommitdiff
path: root/modules/gdnative/gdnative.cpp
diff options
context:
space:
mode:
authorRuslan Mustakov2017-11-21 01:12:36 +0700
committerRuslan Mustakov2017-11-21 20:40:31 +0700
commitebf9b80a47f530e3f75e1e69c7ab48cfaf6cf595 (patch)
tree5f4d2aaa67d1c872ce585430cd277517b582e4dd /modules/gdnative/gdnative.cpp
parent5ff84070ca3604b43e86562a3d000ed924a604a2 (diff)
downloadgodot-ebf9b80a47f530e3f75e1e69c7ab48cfaf6cf595.tar.gz
godot-ebf9b80a47f530e3f75e1e69c7ab48cfaf6cf595.tar.zst
godot-ebf9b80a47f530e3f75e1e69c7ab48cfaf6cf595.zip
Diffstat (limited to 'modules/gdnative/gdnative.cpp')
-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 de118043c..0132ef3c5 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