[osg-users] Android osgPlugins
Christian Kehl
christian-kehl at web.de
Fri Aug 7 14:56:07 PDT 2015
to b) from myself:
I read through the android doc, and it suggests to include the libraries as prebuild, so I added lines like this (see Android.mk.txt for the full file):
OSG_SDK:=/media/christian/DATA/android-osg-sdk/gles1/${APP_ABI}
OSG_SDK_3RDPARTY_LIB_PATH:=${OSG_SDK}/obj/local/${APP_ABI}
THRD_PARTY_SRC:=/media/christian/DATA/3rdparty
include $(CLEAR_VARS)
LOCAL_MODULE := jpeg
LOCAL_EXPORT_C_INCLUDES := $(THRD_PARTY_SRC)/libjpeg
LOCAL_EXPORT_CPP_INCLUDES := $(THRD_PARTY_SRC)/libjpeg
LOCAL_SRC_FILES := $(OSG_SDK_3RDPARTY_LIB_PATH)/libjpeg.a
include $(PREBUILT_STATIC_LIBRARY)
[... same for the other libs ...]
### GLES1 build
include $(CLEAR_VARS)
OSG_SDK:=/media/christian/DATA/android-osg-sdk/gles1/${APP_ABI}
OSG_SDK_LIB_PATH:=$(OSG_SDK)/lib
OSG_SDK_PLUGIN_PATH:=$(OSG_SDK_LIB_PATH)/osgPlugins-3.3.8
ifneq (,$(wildcard $(OSG_SDK)/include/osg/Config))
APP_MODULES := jniosg-gles1
LOCAL_CFLAGS := -Werror -fno-short-enums -fPIC
LOCAL_CPPFLAGS := -DOSG_LIBRARY_STATIC
LOCAL_SRC_FILES := $(OSG_SRC_FILES)
LOCAL_MODULE := libjniosg-gles1
LOCAL_LDLIBS := -llog -lGLESv1_CM -ldl
LOCAL_STATIC_LIBRARIES := jpeg gif png curl tiff
LOCAL_C_INCLUDES := $(OSG_SDK)/include
LOCAL_CPP_INCLUDES := $(OSG_SDK)/include
TARGET_LDLIBS := $(OSG_LDLIBS)
LOCAL_LDFLAGS := -L$(OSG_SDK_LIB_PATH) -L$(OSG_SDK_PLUGIN_PATH)
include $(BUILD_SHARED_LIBRARY)
else
$(warning Unable to find osg/Config file in the headers, not building libjniosg-gles1 module)
endif
[...]
Cheers,
Christian
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64665#64665
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: osg_toolchain_compile_gles2.txt
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150807/2602a10e/attachment-0009.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: osg_toolchain_compile_gles1.txt
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150807/2602a10e/attachment-0010.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Android.mk.txt
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150807/2602a10e/attachment-0011.txt>
More information about the osg-users
mailing list