From Rafa Gaitan and Jorge Izquierdo, build support for Android NDK.
"- In order to build against GLES1 we execute: $ mkdir build_android_gles1 $ cd build_android_gles1 $ cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NDK=<path_to_android_ndk>/ -DOSG_GLES1_AVAILABLE=ON -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DJ=2 -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF $ make If all is correct you will have and static OSG inside: build_android_gles1/bin/ndk/local/armeabi. - GLES2 is not tested/proved, but I think it could be possible build it with the correct cmake flags. - The flag -DJ=2 is used to pass to the ndk-build the number of processors to speed up the building. - make install is not yet supported."
This commit is contained in:
7
PlatformSpecifics/Android/Android.mk.master.in
Normal file
7
PlatformSpecifics/Android/Android.mk.master.in
Normal file
@@ -0,0 +1,7 @@
|
||||
#ANDROID ROOT MAKEFILE
|
||||
OSG_ROOT := $(call my-dir)
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
OSG_ROOT := $(LOCAL_PATH)
|
||||
OSGInclude := $(OSG_ROOT)/include/OpenThreads \
|
||||
$(OSG_ROOT)/include/osg
|
||||
include src/Android.mk
|
||||
23
PlatformSpecifics/Android/Android.mk.modules.in
Normal file
23
PlatformSpecifics/Android/Android.mk.modules.in
Normal file
@@ -0,0 +1,23 @@
|
||||
#ANDROID makefile ${MODULE_NAME}
|
||||
|
||||
LOCAL_PATH := ${MODULE_DIR}
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_CPP_EXTENSION := ${CPP_EXTENSION}
|
||||
|
||||
LOCAL_LDLIBS := ${MODULE_LIBS}
|
||||
|
||||
LOCAL_MODULE := ${MODULE_NAME}
|
||||
|
||||
LOCAL_SRC_FILES := ${MODULE_SOURCES}
|
||||
|
||||
LOCAL_C_INCLUDES := ${MODULE_INCLUDES}
|
||||
|
||||
LOCAL_CFLAGS := ${MODULE_FLAGS_C}
|
||||
|
||||
LOCAL_CPPFLAGS := ${MODULE_FLAGS_CPP}
|
||||
|
||||
#include $(BUILD_STATIC_LIBRARY)
|
||||
include ${MODULE_BUILD_TYPE}
|
||||
|
||||
17
PlatformSpecifics/Android/Android.mk.serializers.in
Normal file
17
PlatformSpecifics/Android/Android.mk.serializers.in
Normal file
@@ -0,0 +1,17 @@
|
||||
#ANDROID makefile in src
|
||||
|
||||
SERIALIZER_ROOT := $(call my-dir)
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
SERIALIZER_ROOT := $(LOCAL_PATH)
|
||||
|
||||
#include $(call all-subdir-makefiles)
|
||||
include $(SERIALIZER_ROOT)/osg/Android.mk
|
||||
include $(SERIALIZER_ROOT)/osgAnimation/Android.mk
|
||||
include $(SERIALIZER_ROOT)/osgFX/Android.mk
|
||||
include $(SERIALIZER_ROOT)/osgManipulator/Android.mk
|
||||
include $(SERIALIZER_ROOT)/osgParticle/Android.mk
|
||||
include $(SERIALIZER_ROOT)/osgShadow/Android.mk
|
||||
include $(SERIALIZER_ROOT)/osgSim/Android.mk
|
||||
include $(SERIALIZER_ROOT)/osgTerrain/Android.mk
|
||||
include $(SERIALIZER_ROOT)/osgText/Android.mk
|
||||
include $(SERIALIZER_ROOT)/osgVolume/Android.mk
|
||||
8
PlatformSpecifics/Android/Android.mk.src.in
Normal file
8
PlatformSpecifics/Android/Android.mk.src.in
Normal file
@@ -0,0 +1,8 @@
|
||||
#ANDROID makefile in src
|
||||
|
||||
SRC_ROOT := $(call my-dir)
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
SRC_ROOT := $(LOCAL_PATH)
|
||||
|
||||
$ENV{AND_OSG_LIB_PATHS}
|
||||
|
||||
7
PlatformSpecifics/Android/AndroidManifest.xml.master.in
Normal file
7
PlatformSpecifics/Android/AndroidManifest.xml.master.in
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.openscenegraph"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
</manifest>
|
||||
15
PlatformSpecifics/Android/Application.mk.master.in
Normal file
15
PlatformSpecifics/Android/Application.mk.master.in
Normal file
@@ -0,0 +1,15 @@
|
||||
#ANDROID APPLICATION MAKEFILE
|
||||
APP_BUILD_SCRIPT := $(call my-dir)/Android.mk
|
||||
APP_PROJECT_PATH := $(call my-dir)
|
||||
|
||||
APP_OPTIM := release
|
||||
|
||||
APP_PLATFORM := android-5
|
||||
APP_STL := gnustl_static
|
||||
APP_CPPFLAGS := -fexceptions -frtti
|
||||
#APP_CPPFLAGS := -Os -mthumb-interwork -fno-short-enums
|
||||
#APP_CPPFLAGS := -Wl,--no-undefined
|
||||
|
||||
APP_ABI := armeabi
|
||||
#armeabi-v7a
|
||||
APP_MODULES := $ENV{AND_OSG_LIB_NAMES}
|
||||
Reference in New Issue
Block a user