From ebf9b80a47f530e3f75e1e69c7ab48cfaf6cf595 Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Tue, 21 Nov 2017 01:12:36 +0700 Subject: Proper GDNative export on Android --- modules/gdnative/gdnative.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules') 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 -- cgit v1.2.3