From ea58cdc71dd6f536d489e05e196fd32a859c92b1 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Mon, 20 Jun 2011 15:57:42 +0000 Subject: [PATCH] (trunk) Do not use prebuilt Android camera libs for armeabi hardware target --- CMakeLists.txt | 26 ++++++++++++++++---------- modules/androidcamera/CMakeLists.txt | 2 +- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b83129..943f642 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1241,16 +1241,18 @@ if(ANDROID) else() SET(OPENCV_LIBTYPE_CONFIGMAKE "STATIC") endif() - if(BUILD_ANDROID_CAMERA_WRAPPER) - set(CMAKE_CAMERA_LIBS_CONFIGCMAKE "native_camera_r${ANDROID_VERSION}") - else() - SET(CMAKE_CAMERA_LIBS_CONFIGCMAKE "") - file(GLOB CMAKE_CAMERA_LIBS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/lib/libnative_camera_r*.so") - foreach(cam_lib ${CMAKE_CAMERA_LIBS}) - get_filename_component(cam_lib "${cam_lib}" NAME) - string(REGEX REPLACE "lib(native_camera_r[0-9]+\\.[0-9]+\\.[0-9]+)\\.so" "\\1" cam_lib "${cam_lib}") - SET(CMAKE_CAMERA_LIBS_CONFIGCMAKE "${CMAKE_CAMERA_LIBS_CONFIGCMAKE} ${cam_lib}") - endforeach() + if(ARMEABI_V7A) + if(BUILD_ANDROID_CAMERA_WRAPPER) + set(CMAKE_CAMERA_LIBS_CONFIGCMAKE "native_camera_r${ANDROID_VERSION}") + else() + SET(CMAKE_CAMERA_LIBS_CONFIGCMAKE "") + file(GLOB CMAKE_CAMERA_LIBS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/lib/libnative_camera_r*.so") + foreach(cam_lib ${CMAKE_CAMERA_LIBS}) + get_filename_component(cam_lib "${cam_lib}" NAME) + string(REGEX REPLACE "lib(native_camera_r[0-9]+\\.[0-9]+\\.[0-9]+)\\.so" "\\1" cam_lib "${cam_lib}") + SET(CMAKE_CAMERA_LIBS_CONFIGCMAKE "${CMAKE_CAMERA_LIBS_CONFIGCMAKE} ${cam_lib}") + endforeach() + endif() endif() endif(ANDROID) # ------------------------------------------------------------------------------------------- @@ -1517,11 +1519,15 @@ message(STATUS " V4L/V4L2: ${HAVE_CAMV4L}/${HAVE_CAMV4L2}") endif() message(STATUS " Xine: ${HAVE_XINE}") if(ANDROID) +if (ARMEABI_V7A) if(BUILD_ANDROID_CAMERA_WRAPPER) message(STATUS " AndroidNativeCamera: build for Android ${ANDROID_VERSION}") else() message(STATUS " AndroidNativeCamera: use prebuilt libraries") endif(BUILD_ANDROID_CAMERA_WRAPPER) +else(ARMEABI_V7A) +message(STATUS " AndroidNativeCamera: NO") +endif(ARMEABI_V7A) endif() endif() #if(UNIX AND NOT APPLE) diff --git a/modules/androidcamera/CMakeLists.txt b/modules/androidcamera/CMakeLists.txt index ecc4597..02174d9 100644 --- a/modules/androidcamera/CMakeLists.txt +++ b/modules/androidcamera/CMakeLists.txt @@ -37,7 +37,7 @@ IF (NOT BUILD_SHARED_LIBS) ) ENDIF() -if (NOT BUILD_ANDROID_CAMERA_WRAPPER) +if (ARMEABI_V7A AND NOT BUILD_ANDROID_CAMERA_WRAPPER) file(GLOB camera_wrappers "${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/lib/libnative_camera_r*.so") foreach(wrapper ${camera_wrappers}) -- 2.7.4