mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
Libinfo build fix;
Libinfo revision formating fix; HW dependent VersionCode for Manager implemented.
This commit is contained in:
parent
f172947ed5
commit
5b148083fe
@ -467,7 +467,7 @@ if(BUILD_ANDROID_PACKAGE)
|
|||||||
add_subdirectory(android/package)
|
add_subdirectory(android/package)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ANDROID AND NOT BUILD_ANDROID_SERVICE AND NOT BUILD_ANDROID_PACKAGE AND NOT BUILD_CAMERA_WRAPER)
|
if (ANDROID)
|
||||||
add_subdirectory(android/libinfo)
|
add_subdirectory(android/libinfo)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ const char* GetLibraryList(void);
|
|||||||
JNIEXPORT jstring JNICALL Java_org_opencv_android_StaticHelper_getLibraryList(JNIEnv *, jclass);
|
JNIEXPORT jstring JNICALL Java_org_opencv_android_StaticHelper_getLibraryList(JNIEnv *, jclass);
|
||||||
|
|
||||||
#define PACKAGE_NAME "org.opencv.lib_v" CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) "_" ANDROID_PACKAGE_PLATFORM
|
#define PACKAGE_NAME "org.opencv.lib_v" CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) "_" ANDROID_PACKAGE_PLATFORM
|
||||||
#define PACKAGE_REVISION CVAUX_STR(CV_SUBMINOR_VERSION) CVAUX_STR(ANDROID_PACKAGE_RELEASE)
|
#define PACKAGE_REVISION CVAUX_STR(CV_SUBMINOR_VERSION) "." CVAUX_STR(ANDROID_PACKAGE_RELEASE)
|
||||||
|
|
||||||
const char* GetPackageName(void)
|
const char* GetPackageName(void)
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.opencv.engine"
|
package="org.opencv.engine"
|
||||||
android:versionCode="21"
|
android:versionCode="22@ANDROID_PLATFORM_VERSION_CODE@"
|
||||||
android:versionName="2.1" >
|
android:versionName="2.2" >
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="8" />
|
<uses-sdk android:minSdkVersion="8" />
|
||||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||||
|
@ -4,6 +4,24 @@ set(JNI_LIB_NAME ${engine} ${engine}_jni)
|
|||||||
unset(__android_project_chain CACHE)
|
unset(__android_project_chain CACHE)
|
||||||
add_android_project(opencv_engine "${CMAKE_CURRENT_SOURCE_DIR}" SDK_TARGET 8 ${ANDROID_SDK_TARGET} IGNORE_JAVA ON)
|
add_android_project(opencv_engine "${CMAKE_CURRENT_SOURCE_DIR}" SDK_TARGET 8 ${ANDROID_SDK_TARGET} IGNORE_JAVA ON)
|
||||||
|
|
||||||
|
set(ANDROID_PLATFORM_VERSION_CODE "0")
|
||||||
|
|
||||||
|
if(ARMEABI_V7A)
|
||||||
|
set(ANDROID_PLATFORM_VERSION_CODE "2")
|
||||||
|
elseif(ARMEABI_V6)
|
||||||
|
set(ANDROID_PLATFORM_VERSION_CODE "1")
|
||||||
|
elseif(ARMEABI)
|
||||||
|
set(ANDROID_PLATFORM_VERSION_CODE "1")
|
||||||
|
elseif(X86)
|
||||||
|
set(ANDROID_PLATFORM_VERSION_CODE "3")
|
||||||
|
elseif(MIPS)
|
||||||
|
set(ANDROID_PLATFORM_VERSION_CODE "4")
|
||||||
|
else()
|
||||||
|
message(WARNING "Can not automatically determine the value for ANDROID_PLATFORM_VERSION_CODE")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${ANDROID_MANIFEST_FILE}" "${OpenCV_BINARY_DIR}/android/service/engine/.build/${ANDROID_MANIFEST_FILE}" @ONLY)
|
||||||
|
|
||||||
link_directories("${ANDROID_SOURCE_TREE}/out/target/product/generic/system/lib" "${ANDROID_SOURCE_TREE}/out/target/product/${ANDROID_PRODUCT}/system/lib" "${ANDROID_SOURCE_TREE}/bin/${ANDROID_ARCH_NAME}")
|
link_directories("${ANDROID_SOURCE_TREE}/out/target/product/generic/system/lib" "${ANDROID_SOURCE_TREE}/out/target/product/${ANDROID_PRODUCT}/system/lib" "${ANDROID_SOURCE_TREE}/bin/${ANDROID_ARCH_NAME}")
|
||||||
|
|
||||||
# -D__SUPPORT_ARMEABI_FEATURES key is also available
|
# -D__SUPPORT_ARMEABI_FEATURES key is also available
|
||||||
|
Loading…
Reference in New Issue
Block a user