fix libraries not working on android
This is all we need for osg on android. I'm not sure why we need it but I'm guessing it's an osg / android / openmw thing.
I have built without this and almost no textures load,
This image was taken on the boat before entering your name.
Based on how the equivalent problem is handled for other platforms, I think you should be making OSG look for the plugin with the platform's standard name rather than forcing the name to match desktop Linux. You should be able to get that working with something like this:
diff --git a/src/osgDB/Registry.cpp b/src/osgDB/Registry.cpp
index c47439b61..af970aad6 100644
--- a/src/osgDB/Registry.cpp
+++ b/src/osgDB/Registry.cpp
@@ -793,6 +793,8 @@ std::string Registry::createLibraryNameForExtension(const std::string& ext)
return prepend+"osgdb_"+lowercase_ext+OSG_LIBRARY_POSTFIX_WITH_QUOTES+".dll";
#elif macintosh
return prepend+"osgdb_"+lowercase_ext+OSG_LIBRARY_POSTFIX_WITH_QUOTES;
+#elif defined(__ANDROID__)
+ return preprend+"lib"+"osgdb_"+lowercase_ext+OSG_LIBRARY_POSTFIX_WITH_QUOTES+ADDQUOTES(OSG_PLUGIN_EXTENSION);
#else
return prepend+"osgdb_"+lowercase_ext+OSG_LIBRARY_POSTFIX_WITH_QUOTES+ADDQUOTES(OSG_PLUGIN_EXTENSION);
#endif
testing this out now, Yes it worked.
we do use a lot of flags to build osg on android
-DDYNAMIC_OPENTHREADS=OFF \
-DDYNAMIC_OPENSCENEGRAPH=OFF \
-DBUILD_OSG_PLUGIN_OSG=ON \
-DBUILD_OSG_PLUGIN_DAE=ON \
-DBUILD_OSG_PLUGIN_DDS=ON \
-DBUILD_OSG_PLUGIN_TGA=ON \
-DBUILD_OSG_PLUGIN_BMP=ON \
-DBUILD_OSG_PLUGIN_JPEG=ON \
-DBUILD_OSG_PLUGIN_PNG=ON \
-DBUILD_OSG_PLUGIN_FREETYPE=ON \
-DOSG_CPP_EXCEPTIONS_AVAILABLE=TRUE \
-DJPEG_INCLUDE_DIR=${PREFIX}/include/ \
-DPNG_INCLUDE_DIR=${PREFIX}/include/ \
-DCOLLADA_INCLUDE_DIR=${PREFIX}/include/collada-dom2.5 \
-DOSG_GL1_AVAILABLE=ON \
-DOSG_GL2_AVAILABLE=OFF \
-DOSG_GL3_AVAILABLE=OFF \
-DOSG_GLES1_AVAILABLE=OFF \
-DOSG_GLES2_AVAILABLE=OFF \
-DOSG_GL_LIBRARY_STATIC=OFF \
-DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF \
-DOSG_GL_MATRICES_AVAILABLE=ON \
-DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON \
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON \
-DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON \
-DBUILD_OSG_APPLICATIONS=OFF \
-DBUILD_OSG_PLUGINS_BY_DEFAULT=OFF \
-DBUILD_OSG_DEPRECATED_SERIALIZERS=OFF \
-DOSG_FIND_3RD_PARTY_DEPS=OFF \
-DOPENGL_INCLUDE_DIR=${PREFIX}/include/gl4es/ \
-DCMAKE_CXX_FLAGS=-Dauto_ptr=unique_ptr\ -I${PREFIX}/include/freetype2/\ "${CXXFLAGS}"```