From 83b2621de4a53506afcd47b69fac210534304fe3 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 19 Jun 2015 18:53:45 +0300 Subject: [PATCH] Android: renamed default library name for static and dynamic fallback load; fixed libz import for 64-bit platforms --- cmake/OpenCVFindLibsGrfmt.cmake | 3 ++- .../java/generator/src/java/android+AsyncServiceHelper.java | 2 +- modules/java/generator/src/java/android+StaticHelper.java | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake index b5f38279e3..614f844c7b 100644 --- a/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake @@ -8,7 +8,8 @@ if(BUILD_ZLIB) else() find_package(ZLIB "${MIN_VER_ZLIB}") if(ZLIB_FOUND AND ANDROID) - if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so") + if(ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib/libz.so" OR + ZLIB_LIBRARIES STREQUAL "${ANDROID_SYSROOT}/usr/lib64/libz.so") set(ZLIB_LIBRARIES z) endif() endif() diff --git a/modules/java/generator/src/java/android+AsyncServiceHelper.java b/modules/java/generator/src/java/android+AsyncServiceHelper.java index e18d5a5001..4d9d115389 100644 --- a/modules/java/generator/src/java/android+AsyncServiceHelper.java +++ b/modules/java/generator/src/java/android+AsyncServiceHelper.java @@ -376,7 +376,7 @@ class AsyncServiceHelper else { // If the dependencies list is not defined or empty. - String AbsLibraryPath = Path + File.separator + "libopencv_java.so"; + String AbsLibraryPath = Path + File.separator + "libopencv_java3.so"; result &= loadLibrary(AbsLibraryPath); } diff --git a/modules/java/generator/src/java/android+StaticHelper.java b/modules/java/generator/src/java/android+StaticHelper.java index 10442c904d..36f9f6f64a 100644 --- a/modules/java/generator/src/java/android+StaticHelper.java +++ b/modules/java/generator/src/java/android+StaticHelper.java @@ -92,7 +92,7 @@ class StaticHelper { else { // If dependencies list is not defined or empty. - result &= loadLibrary("opencv_java"); + result &= loadLibrary("opencv_java3"); } return result;