|
|
|
@ -136,7 +136,7 @@ else() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if(ANDROID) |
|
|
|
|
set(OPENCV_LIB_INSTALL_PATH libs/${ARMEABI_NDK_NAME}) |
|
|
|
|
set(OPENCV_LIB_INSTALL_PATH libs/${ANDROID_NDK_ABI_NAME}) |
|
|
|
|
else() |
|
|
|
|
set(OPENCV_LIB_INSTALL_PATH lib${LIB_SUFFIX}) |
|
|
|
|
endif() |
|
|
|
@ -745,7 +745,7 @@ endif() |
|
|
|
|
|
|
|
|
|
# Java support |
|
|
|
|
# =================================================== |
|
|
|
|
if (PYTHON_EXECUTABLE AND ANDROID AND ANDROID_API_LEVEL GREATER 7) |
|
|
|
|
if (PYTHON_EXECUTABLE AND ANDROID AND ANDROID_NATIVE_API_LEVEL GREATER 7) |
|
|
|
|
option(BUILD_JAVA_SUPPORT "Build with Java support" TRUE) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
@ -815,7 +815,7 @@ if (BUILD_JAVA_SUPPORT) |
|
|
|
|
|
|
|
|
|
# detect ANDROID_SDK_TARGET if no target is provided by user |
|
|
|
|
if (NOT ANDROID_SDK_TARGET) |
|
|
|
|
set(desired_android_target_level ${ANDROID_API_LEVEL}) |
|
|
|
|
set(desired_android_target_level ${ANDROID_NATIVE_API_LEVEL}) |
|
|
|
|
if (desired_android_target_level LESS 8) |
|
|
|
|
set(desired_android_target_level 8) |
|
|
|
|
endif() |
|
|
|
@ -1124,7 +1124,7 @@ if(WIN32) |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
############## Android source tree for native camera ############### |
|
|
|
|
if(ANDROID AND ANDROID_API_LEVEL GREATER 7) |
|
|
|
|
if(ANDROID AND ANDROID_NATIVE_API_LEVEL GREATER 7) |
|
|
|
|
option(WITH_ANDROID_CAMERA "Build with native Android camera support" TRUE) |
|
|
|
|
|
|
|
|
|
SET (ANDROID_SOURCE_TREE "ANDROID_SOURCE_TREE-NOTFOUND" CACHE PATH |
|
|
|
@ -1398,8 +1398,8 @@ set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/${OPENCV_INCLUDE_P |
|
|
|
|
|
|
|
|
|
set(CMAKE_OPENCV2_INCLUDE_DIRS_CONFIGCMAKE "") |
|
|
|
|
if(ANDROID) |
|
|
|
|
set(CMAKE_LIB_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/libs/\${ARMEABI_NDK_NAME}\"") |
|
|
|
|
set(CMAKE_3RDPARTY_LIB_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/share/OpenCV/3rdparty/libs/\${ARMEABI_NDK_NAME}\"") |
|
|
|
|
set(CMAKE_LIB_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/libs/\${ANDROID_NDK_ABI_NAME}\"") |
|
|
|
|
set(CMAKE_3RDPARTY_LIB_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/share/OpenCV/3rdparty/libs/\${ANDROID_NDK_ABI_NAME}\"") |
|
|
|
|
else() |
|
|
|
|
set(CMAKE_LIB_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/${OPENCV_LIB_INSTALL_PATH}\"") |
|
|
|
|
set(CMAKE_3RDPARTY_LIB_DIRS_CONFIGCMAKE "\"\${OpenCV_INSTALL_PATH}/share/OpenCV/3rdparty/${OPENCV_LIB_INSTALL_PATH}\"") |
|
|
|
@ -1462,7 +1462,7 @@ if(ANDROID) |
|
|
|
|
set(CMAKE_CAMERA_LIBS_CONFIGCMAKE "native_camera_r${ANDROID_VERSION}") |
|
|
|
|
elseif(WITH_ANDROID_CAMERA) |
|
|
|
|
SET(CMAKE_CAMERA_LIBS_CONFIGCMAKE "") |
|
|
|
|
file(GLOB CMAKE_CAMERA_LIBS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/lib/${ARMEABI_NDK_NAME}/libnative_camera_r*.so") |
|
|
|
|
file(GLOB CMAKE_CAMERA_LIBS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/lib/${ANDROID_NDK_ABI_NAME}/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}") |
|
|
|
@ -1671,8 +1671,8 @@ else() |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
|
if(ANDROID) |
|
|
|
|
status(" Floating point type:" ${ARM_TARGET}) |
|
|
|
|
status(" Native API level:" android-${ANDROID_API_LEVEL}) |
|
|
|
|
status(" Android ABI:" ${ANDROID_ABI}) |
|
|
|
|
status(" Native API level:" android-${ANDROID_NATIVE_API_LEVEL}) |
|
|
|
|
status(" SDK target:" "${ANDROID_SDK_TARGET}") |
|
|
|
|
endif() |
|
|
|
|
|
|
|
|
@ -1735,7 +1735,7 @@ if(UNIX AND NOT APPLE) |
|
|
|
|
|
|
|
|
|
if(ANDROID) |
|
|
|
|
if(WITH_ANDROID_CAMERA) |
|
|
|
|
status(" AndroidNativeCamera:" BUILD_ANDROID_CAMERA_WRAPPER THEN "build for Android ${ANDROID_VERSION}" ELSE "use prebuilt libraries") |
|
|
|
|
status(" AndroidNativeCamera:" BUILD_ANDROID_CAMERA_WRAPPER THEN "YES, build for Android ${ANDROID_VERSION}" ELSE "YES, use prebuilt libraries") |
|
|
|
|
else() |
|
|
|
|
status(" AndroidNativeCamera:" "NO (native camera requires Android API level 8 or higher)") |
|
|
|
|
endif() |
|
|
|
@ -1776,7 +1776,7 @@ status(" Interfaces:") |
|
|
|
|
status(" Python:" BUILD_NEW_PYTHON_SUPPORT THEN YES ELSE NO) |
|
|
|
|
status(" Python interpreter:" PYTHON_EXECUTABLE THEN "${PYTHON_EXECUTABLE} (ver ${PYTHON_VERSION_MAJOR_MINOR})" ELSE NO) |
|
|
|
|
status(" Python numpy:" PYTHON_USE_NUMPY THEN YES ELSE "NO (Python wrappers will not be generated)") |
|
|
|
|
if(ANDROID AND ANDROID_API_LEVEL LESS 8) |
|
|
|
|
if(ANDROID AND ANDROID_NATIVE_API_LEVEL LESS 8) |
|
|
|
|
status(" Java:" "NO (Java API requires Android API level 8 or higher)") |
|
|
|
|
else() |
|
|
|
|
status(" Java:" BUILD_JAVA_SUPPORT THEN YES ELSE NO) |
|
|
|
|