Android集成OGRE编译脚本
测试的目录结构
├── AUTHORS├── BuildingOgre.md├── CMake├── CMakeLists.txt├── CTestConfig.cmake├── Components├── Docs├── ISSUE_TEMPLATE.md├── Jenkinsfile├── LICENSE├── OgreMain├── Other├── PlugIns├── README.md├── RenderSystems├── SDK├── Samples├── Tests├── Tools├── test│ ├── Android.mk│ ├── Application.mk│ ├── build_arm64| ├── jni│ │ ├── Android.mk│ │ └── Application.mk├── appveyor.yml├── build_android├── build_android_arm64├── ci-build.cmake├── ogredeps_android│ ├── include│ └── lib├── ogredeps_android_arm64│ ├── include│ └── lib├── ogredeps_ios│ ├── include│ └── lib
Application.mk
# 32位 armeabi-v7a 64位 arm64-v8aAPP_ABI := armeabi-v7aAPP_PLATFORM := android-19APP_STL := c++_staticAPP_CPPFLAGS := -std=c++11APP_OPTIM := debug
Android.mk
LOCAL_PATH := $(call my-dir)# 此处为OGRE库目录OGRE_SRC_DIR :=$(LOCAL_PATH)/../../..# 根据 APP_ABI 选择对应的LIB和DEPOGRE_LIB_DIR :=$(LOCAL_PATH)/../../../build_android_arm64/libOGRE_DEP_DIR :=$(OGRE_SRC_DIR)/ogredeps_android_arm64TEST_SRC_DIR :=$(OGRE_SRC_DIR)/TestOgre$(warning \"----------------------------\")$(warning \"OGRE_SRC_DIR=$(OGRE_SRC_DIR)\")$(warning \"OGRE_LIB_DIR=$(OGRE_LIB_DIR)\")$(warning \"OGRE_DEP_DIR=$(OGRE_DEP_DIR)\")$(warning \"LOCAL_PATH=$(LOCAL_PATH)\")$(warning \"TEST_SRC_DIR=$(TEST_SRC_DIR)\")$(warning \"----------------------------\")include $(CLEAR_VARS)LOCAL_MODULE:= libzzipLOCAL_SRC_FILES:= $(OGRE_DEP_DIR)/lib/libzzip.a$(warning \"libzzip=$(LOCAL_SRC_FILES)\")$(warning \"----------------------------\")LOCAL_EXPORT_C_INCLUDES := $(OGRE_DEP_DIR)/include/zzipinclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE:= libPlugin_ParticleFXStaticLOCAL_SRC_FILES:= $(OGRE_LIB_DIR)/libPlugin_ParticleFXStatic.aLOCAL_EXPORT_C_INCLUDES := $(OGRE_SRC_DIR)/Plugins/ParticleFX/includeinclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE:= libPlugin_OctreeSceneManagerStaticLOCAL_SRC_FILES:= $(OGRE_LIB_DIR)/libPlugin_OctreeSceneManagerStatic.aLOCAL_EXPORT_C_INCLUDES := $(OGRE_SRC_DIR)/Plugins/OctreeSceneManager/includeinclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE:= libCodec_STBIStaticLOCAL_SRC_FILES:= $(OGRE_LIB_DIR)/libCodec_STBIStatic.aLOCAL_EXPORT_C_INCLUDES := $(OGRE_SRC_DIR)/Plugins/STBICodec/includeinclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE:= libOgreRTShaderSystemStaticLOCAL_SRC_FILES:= $(OGRE_LIB_DIR)/libOgreRTShaderSystemStatic.aLOCAL_EXPORT_C_INCLUDES := $(OGRE_SRC_DIR)/Components/RTShaderSystem/includeinclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE:= libOgreBitesStaticLOCAL_SRC_FILES:= $(OGRE_LIB_DIR)/libOgreBitesStatic.aLOCAL_EXPORT_C_INCLUDES := $(OGRE_SRC_DIR)/Components/Bites/include \\$(OGRE_SRC_DIR)/RenderSystems/GLES2/includeinclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE:= libRenderSystem_GLES2StaticLOCAL_SRC_FILES:= $(OGRE_LIB_DIR)/libRenderSystem_GLES2Static.aLOCAL_EXPORT_C_INCLUDES := $(OGRE_SRC_DIR)/RenderSystems/GLES2/includeinclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE:= libOgreGLSupportStaticLOCAL_SRC_FILES:= $(OGRE_LIB_DIR)/libOgreGLSupportStatic.aLOCAL_EXPORT_C_INCLUDES := $(OGRE_SRC_DIR)/RenderSystems/GLES2/include/EGL \\$(OGRE_SRC_DIR)/RenderSystems/GLSupport/include/EGL \\$(OGRE_SRC_DIR)/RenderSystems/GLSupport/includeinclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE:= libOgreMainStaticLOCAL_SRC_FILES:= $(OGRE_LIB_DIR)/libOgreMainStatic.aLOCAL_EXPORT_C_INCLUDES := $(OGRE_SRC_DIR)/OgreMain/include \\$(OGRE_SRC_DIR)/OgreMain/src \\$(OGRE_SRC_DIR)/OgreMain/Threading/includeinclude $(PREBUILT_STATIC_LIBRARY)include $(CLEAR_VARS)LOCAL_MODULE := libTestOgreLOCAL_LDLIBS := -landroid -lc -lm -ldl -llog -lEGL -lGLESv2 -lz -ljnigraphicsLOCAL_LDLIBS += -L$(OGRE_LIB_DIR) -L$(OGRE_DEP_DIR)/libLOCAL_LDLIBS += -lRenderSystem_GLES2Static -lOgreGLSupportStatic -lPlugin_OctreeSceneManagerStatic -lOgreBitesStatic -lOgreRTShaderSystemStatic -lOgreOverlayStatic -lOgreMainStatic -lPlugin_ParticleFXStatic -lCodec_STBIStaticLOCAL_LDLIBS += -lzzip -lfreetypeLOCAL_LDLIBS += $(OGRE_LIB_DIR)/libcpufeatures.aLOCAL_CFLAGS := -I$(TEST_SRC_DIR)/include \\-I$(TEST_SRC_DIR)/src \\-I$(OGRE_LIB_DIR)/../include \\-I$(OGRE_SRC_DIR)/OgreMain/include/Threading/include \\-I$(OGRE_SRC_DIR)/Components/Overlay/include \\-I$(OGRE_SRC_DIR)/RenderSystems/GLES2/include \\-I$(OGRE_SRC_DIR)/RenderSystems/GLES2/src/GLSLES/include \\-I$(OGRE_SRC_DIR)/RenderSystems/GLES2/include/EGL \\-I$(OGRE_SRC_DIR)/RenderSystems/GLSupport/include/EGL \\-I$(OGRE_SRC_DIR)/RenderSystems/GLSupport/include/GLSL \\-I$(OGRE_SRC_DIR)/RenderSystems/GLSupport/include \\-I$(OGRE_SRC_DIR)/OgreMain/src \\-I$(OGRE_SRC_DIR)/Plugins/OctreeSceneManager/include \\-I$(OGRE_SRC_DIR)/Components/RTShaderSystem/include \\-I$(OGRE_SRC_DIR)/Components/Bites/include \\-I$(OGRE_SRC_DIR)/Plugins/OctreeSceneManager/include \\-I$(OGRE_DEP_DIR)/include/zzipLOCAL_CFLAGS += -fexceptions -frtti -x c++ -D___ANDROID___ -DANDROID -DZZIP_OMIT_CONFIG_H -DINCLUDE_RTSHADER_SYSTEM=1LOCAL_CFLAGS += -gLOCAL_STATIC_LIBRARIES := libCodec_STBIStatic \\libPlugin_ParticleFXStatic \\libPlugin_OctreeSceneManagerStatic \\libOgreBitesStatic \\libRenderSystem_GLES2Static \\libOgreGLSupportStatic \\libOgreMainStatic \\libOgreRTShaderSystemStaticLOCAL_SRC_FILES := $(TEST_SRC_DIR)/src/Jni.cpp \\$(TEST_SRC_DIR)/src/TestSceneManager.cppinclude $(BUILD_SHARED_LIBRARY)