标签:eve lists mingw set 配置 include pop nat model
本文代码见: https://github.com/jiangxincode/OpenGLDemo
D:\Code\temp\assimp-5.0.1
scripts\android_crosscompile\make_android.bat
拷贝为scripts\android_crosscompile\make_android_self_defined.bat
scripts\android_crosscompile\make_android_self_defined.bat
中的内容进行自定义配置,我的配置如下:@echo off
set ASSIMP_PATH=D:\Code\temp\assimp-5.0.1
set CMAKE_PATH="C:\Users\jiangxin\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe"
set ANDROID_NDK_PATH=C:\Users\jiangxin\AppData\Local\Android\Sdk\ndk\22.0.7026061
set ANDROID_CMAKE_PATH=C:\Users\jiangxin\AppData\Local\Android\Sdk\ndk\22.0.7026061\build\cmake
pushd %ASSIMP_PATH%
rmdir /s /q build
mkdir build
cd build
%CMAKE_PATH% .. ^
-G"MinGW Makefiles" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_CXX_FLAGS_RELEASE="%CMAKE_CXX_FLAGS_RELEASE% -Os -Wall -s" ^
-DCMAKE_TOOLCHAIN_FILE=%ANDROID_CMAKE_PATH%\android.toolchain.cmake ^
-DCMAKE_MAKE_PROGRAM=%ANDROID_NDK_PATH%\prebuilt\windows-x86_64\bin\make.exe ^
-DANDROID_NDK=%ANDROID_NDK_PATH% ^
-DANDROID_NATIVE_API_LEVEL=android-16 ^
-DASSIMP_ANDROID_JNIIOSYSTEM=ON ^
-DANDROID_ABI=arm64-v8a ^
-DASSIMP_BUILD_ZLIB=ON ^
-DASSIMP_BUILD_TESTS=OFF ^
-DASSIMP_BUILD_ASSIMP_TOOLS=OFF ^
-DASSIMP_NO_EXPORT=ON
%CMAKE_PATH% --build .
popd
cd D:\Code\temp\assimp-5.0.1\scripts\android_crosscompile
.\make_android_self_defined.bat
assimp-4.1.0\build\codelibassimp.so
放到app\libs\
assimp-4.1.0\include
中的目录放到app\src\main\cpp\include
assimp-4.1.0\build\include\assimp\config.h
拷贝到app\src\main\cpp\assimp-4.1.0\include\assimp
OpenCV的集成比较简单,官网提供了Android平台所需的动态库和C++头文件。
D:\Code\temp\opencv-4.5.1-android-sdk
OpenCV-android-sdk\sdk\native\libs\arm64-v8a\libopencv_java4.so
拷贝到app\libs\
OpenCV-android-sdk\sdk\native\jni\include
中的内容拷贝到app\src\main\cpp\include
GLM的集成就更简单了,源码都是hpp文件(即定义和实现在同一个文件中)。
D:\Code\temp\glm-0.9.9.8
glm-0.9.9.8\glm
中的内容拷贝到app\src\main\cpp\include
Android平台OpenGL ES/Assimp/OpenCV/GLM集成说明
标签:eve lists mingw set 配置 include pop nat model
原文地址:https://www.cnblogs.com/jiangxinnju/p/14674355.html