Hello,
I have successfully built OpenCV for Android using the c++_static STL and clang on an Ubuntu 16.04 machine. Functionality I have tested so far appears to be OK.
On armeabi-v7a, execution performance (as in time it takes to run inferences within the DNN module) matches the performance that I get if I use the official 3.4.1 Android libraries. However, when I build for arm64-v8a, performance of the custom build is about 3x slower than the official OpenCV Android libraries for the same ABI. I can't figure out what the variance (apart from c++_static) in my build configuration may be.
The only reason I'm running my own build is that I require a c++_static build due to other dependencies in my project which I'm unable to change.
If anyone is able to and willing to review and help, below is the CMAKE configuration that I'm using to build the arm64-v8a library. Why is my custom built library slower than the official OpenCV Android arm64-v8a release? What can I do to match performance?
ANDROID_ABI:STRING=arm64-v8a
ANDROID_ARM_NEON:BOOL=ON
//Build binaries of Android examples with native libraries
ANDROID_EXAMPLES_WITH_LIBS:BOOL=OFF
ANDROID_PLATFORM:STRING=android-25
ANDROID_STL:STRING=c++_static
//Build examples for Android platform
BUILD_ANDROID_EXAMPLES:BOOL=OFF
//Build Android projects providing .apk files
BUILD_ANDROID_PROJECTS:BOOL=OFF
//Build OpenCV Manager for Google Play
BUILD_ANDROID_SERVICE:BOOL=OFF
//Build CUDA modules stubs when no CUDA SDK
BUILD_CUDA_STUBS:BOOL=OFF
//Create build rules for OpenCV Documentation
BUILD_DOCS:BOOL=OFF
//Build all examples
BUILD_EXAMPLES:BOOL=OFF
//Build libjasper from source
BUILD_JASPER:BOOL=ON
//Enable Java support
BUILD_JAVA:BOOL=ON
//Build libjpeg from source
BUILD_JPEG:BOOL=ON
//Build only listed modules (comma-separated, e.g. 'videoio,dnn,ts')
BUILD_LIST:STRING=
//Build openexr from source
BUILD_OPENEXR:BOOL=ON
//Enables 'make package_source' command
BUILD_PACKAGE:BOOL=ON
//Build performance tests
BUILD_PERF_TESTS:BOOL=OFF
//Build libpng from source
BUILD_PNG:BOOL=OFF
//Force to build libprotobuf from sources
BUILD_PROTOBUF:BOOL=ON
//Build shared libraries (.dll/.so) instead of static ones (.lib/.a)
BUILD_SHARED_LIBS:BOOL=ON
//Download and build TBB from source
BUILD_TBB:BOOL=ON
//Build accuracy & regression tests
BUILD_TESTS:BOOL=OFF
//Build libtiff from source
BUILD_TIFF:BOOL=ON
//Use symlinks instead of files copying during build (and !!INSTALL!!)
BUILD_USE_SYMLINKS:BOOL=OFF
//Build WebP from source
BUILD_WEBP:BOOL=ON
//Include debug info into release binaries ('OFF' means default
// settings)
BUILD_WITH_DEBUG_INFO:BOOL=OFF
//Enables dynamic linking of IPP (only for standalone IPP)
BUILD_WITH_DYNAMIC_IPP:BOOL=OFF
//Build zlib from source
BUILD_ZLIB:BOOL=OFF
//Build utility applications (used for example to train classifiers)
BUILD_opencv_apps:BOOL=OFF
//Include opencv_calib3d module into the OpenCV build
BUILD_opencv_calib3d:BOOL=ON
//Include opencv_core module into the OpenCV build
BUILD_opencv_core:BOOL=ON
//Include opencv_dnn module into the OpenCV build
BUILD_opencv_dnn:BOOL=ON
//Include opencv_features2d module into the OpenCV build
BUILD_opencv_features2d:BOOL=ON
//Include opencv_flann module into the OpenCV build
BUILD_opencv_flann:BOOL=ON
//Include opencv_highgui module into the OpenCV build
BUILD_opencv_highgui:BOOL=ON
//Include opencv_imgcodecs module into the OpenCV build
BUILD_opencv_imgcodecs:BOOL=ON
//Include opencv_imgproc module into the OpenCV build
BUILD_opencv_imgproc:BOOL=ON
//Include opencv_java_bindings_generator module into the OpenCV
// build
BUILD_opencv_java_bindings_generator:BOOL=ON
//Include opencv_js module into the OpenCV build
BUILD_opencv_js:BOOL=OFF
//Include opencv_ml module into the OpenCV build
BUILD_opencv_ml:BOOL=ON
//Include opencv_objdetect module into the OpenCV build
BUILD_opencv_objdetect:BOOL=ON
//Include opencv_photo module into the OpenCV build
BUILD_opencv_photo:BOOL=ON
//Include opencv_python_bindings_generator module into the OpenCV
// build
BUILD_opencv_python_bindings_generator:BOOL=ON
//Include opencv_shape module into the OpenCV build
BUILD_opencv_shape:BOOL=ON
//Include opencv_stitching module into the OpenCV build
BUILD_opencv_stitching:BOOL=ON
//Include opencv_superres module into the OpenCV build
BUILD_opencv_superres:BOOL=ON
//Include opencv_ts module into the OpenCV build
BUILD_opencv_ts:BOOL=ON
//Include opencv_video module into the OpenCV build
BUILD_opencv_video:BOOL=ON
//Include opencv_videoio module into the OpenCV build
BUILD_opencv_videoio:BOOL=ON
//Include opencv_videostab module into the OpenCV build
BUILD_opencv_videostab:BOOL=ON
//Include opencv_world module into the OpenCV build
BUILD_opencv_world:BOOL=ON
CAROTENE_NS:STRING=carotene_o4t
//Path to a program.
CCACHE_PROGRAM:FILEPATH=CCACHE_PROGRAM-NOTFOUND
//Archiver
CMAKE_AR:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ar
//The ASM compiler
CMAKE_ASM_COMPILER:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
//LLVM archiver
CMAKE_ASM_COMPILER_AR:FILEPATH=CMAKE_ASM_COMPILER_AR-NOTFOUND
//Generate index for LLVM archive
CMAKE_ASM_COMPILER_RANLIB:FILEPATH=CMAKE_ASM_COMPILER_RANLIB-NOTFOUND
//Flags used by the compiler during all build types.
CMAKE_ASM_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_ASM_FLAGS_DEBUG:STRING=
//Flags used by the ASM compiler during MINSIZEREL builds.
CMAKE_ASM_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_ASM_FLAGS_RELEASE:STRING=
//Flags used by the ASM compiler during RELWITHDEBINFO builds.
CMAKE_ASM_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Choose the type of build, options are: None Debug Release RelWithDebInfo
// MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=Release
//Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON
//Configs
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release
//LLVM archiver
CMAKE_CXX_COMPILER_AR:FILEPATH=CMAKE_CXX_COMPILER_AR-NOTFOUND
//Generate index for LLVM archive
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=CMAKE_CXX_COMPILER_RANLIB-NOTFOUND
//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=
//Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Libraries linked by default with all C++ applications.
CMAKE_CXX_STANDARD_LIBRARIES:STRING=-latomic -lm "/home/vernium/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a" "/home/vernium/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++abi.a" "-ldl"
//LLVM archiver
CMAKE_C_COMPILER_AR:FILEPATH=CMAKE_C_COMPILER_AR-NOTFOUND
//Generate index for LLVM archive
CMAKE_C_COMPILER_RANLIB:FILEPATH=CMAKE_C_COMPILER_RANLIB-NOTFOUND
//Flags used by the compiler during all build types.
CMAKE_C_FLAGS:STRING=
//Flags used by the compiler during debug builds.
CMAKE_C_FLAGS_DEBUG:STRING=
//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds.
CMAKE_C_FLAGS_RELEASE:STRING=
//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Libraries linked by default with all C applications.
CMAKE_C_STANDARD_LIBRARIES:STRING=-latomic -lm
//Flags used by the linker.
CMAKE_EXE_LINKER_FLAGS:STRING=
//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
//Installation Directory
CMAKE_INSTALL_PREFIX:PATH=/home/vernium/Documents/source/opencv_android_build_arm64/install
//Path to a program.
CMAKE_LINKER:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ld
//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
//Flags used by the linker during the creation of modules.
CMAKE_MODULE_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_NM:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-nm
//Path to a program.
CMAKE_OBJCOPY:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-objcopy
//Path to a program.
CMAKE_OBJDUMP:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-objdump
//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=OpenCV
//Ranlib
CMAKE_RANLIB:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-ranlib
//Flags used by the linker during the creation of dll's.
CMAKE_SHARED_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of shared libraries
// during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=OFF
//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=OFF
//Flags used by the linker during the creation of static libraries
// during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=
//Flags used by the linker during the creation of static libraries
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during the creation of static libraries
// during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during the creation of static libraries
// during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during the creation of static libraries
// during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program.
CMAKE_STRIP:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-strip
//The CMake toolchain file
CMAKE_TOOLCHAIN_FILE:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/build/cmake/android.toolchain.cmake
//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make. This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=OFF
//Enable to build Debian packages
CPACK_BINARY_DEB:BOOL=OFF
//Enable to build FreeBSD packages
CPACK_BINARY_FREEBSD:BOOL=OFF
//Enable to build IFW packages
CPACK_BINARY_IFW:BOOL=OFF
//Enable to build NSIS packages
CPACK_BINARY_NSIS:BOOL=OFF
//Enable to build RPM packages
CPACK_BINARY_RPM:BOOL=OFF
//Enable to build STGZ packages
CPACK_BINARY_STGZ:BOOL=ON
//Enable to build TBZ2 packages
CPACK_BINARY_TBZ2:BOOL=OFF
//Enable to build TGZ packages
CPACK_BINARY_TGZ:BOOL=ON
//Enable to build TXZ packages
CPACK_BINARY_TXZ:BOOL=OFF
//Enable to build TZ packages
CPACK_BINARY_TZ:BOOL=ON
//Enable to build RPM source packages
CPACK_SOURCE_RPM:BOOL=OFF
//Enable to build TBZ2 source packages
CPACK_SOURCE_TBZ2:BOOL=ON
//Enable to build TGZ source packages
CPACK_SOURCE_TGZ:BOOL=ON
//Enable to build TXZ source packages
CPACK_SOURCE_TXZ:BOOL=ON
//Enable to build TZ source packages
CPACK_SOURCE_TZ:BOOL=ON
//Enable to build ZIP source packages
CPACK_SOURCE_ZIP:BOOL=OFF
//Android cpufeatures project sources (for example, <android-ndk>/sources/android/cpufeatures)
CPUFEATURES_ROOT:PATH=/home/vernium/Documents/source/opencv/3rdparty/cpufeatures
//Specify list of enabled baseline CPU optimizations
CPU_BASELINE:STRING=DETECT
//Specify list of forbidden baseline CPU optimizations
CPU_BASELINE_DISABLE:STRING=
//Specify list of required baseline CPU optimizations
CPU_BASELINE_REQUIRE:STRING=;VFPV3;NEON
//Specify list of dispatched CPU optimizations
CPU_DISPATCH:STRING=NEON
//Disable explicit optimized code (dispatched code/intrinsics/loop
// unrolling/etc)
CV_DISABLE_OPTIMIZATION:BOOL=OFF
//Use intrinsic-based optimized code
CV_ENABLE_INTRINSICS:BOOL=ON
//Enable OpenCV code trace
CV_TRACE:BOOL=OFF
//Value Computed by CMake
Carotene_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/3rdparty/carotene/hal/carotene
//Value Computed by CMake
Carotene_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/3rdparty/carotene
//Enable hardening of the resulting binaries (against security
// attacks, detects memory corruption, etc)
ENABLE_BUILD_HARDENING:BOOL=OFF
//Use ccache
ENABLE_CCACHE:BOOL=ON
//Collect implementation data on function call
ENABLE_IMPL_COLLECTION:BOOL=OFF
//Instrument functions to collect calls trace and performance
ENABLE_INSTRUMENTATION:BOOL=OFF
//Enable NEON instructions
ENABLE_NEON:BOOL=ON
//Show all warnings even if they are too noisy
ENABLE_NOISY_WARNINGS:BOOL=OFF
//Generate position independent code (necessary for shared libraries)
ENABLE_PIC:BOOL=ON
//Solution folder in Visual Studio or in other IDEs
ENABLE_SOLUTION_FOLDERS:BOOL=OFF
//Enable Thin LTO
ENABLE_THIN_LTO:BOOL=OFF
//Enable VFPv3-D32 instructions
ENABLE_VFPV3:BOOL=ON
//Output directory for applications
EXECUTABLE_OUTPUT_PATH:PATH=/home/vernium/Documents/source/opencv_android_build_arm64/bin
//Generate XML file for abi_compliance_checker tool
GENERATE_ABI_DESCRIPTOR:BOOL=OFF
//Git command line client
GIT_EXECUTABLE:FILEPATH=/usr/bin/git
//IEEE floating point is available
HAVE_IEEEFP:STRING=1
//Native CPU bit order
HOST_BIG_ENDIAN:STRING=OFF
//Native CPU bit order
HOST_FILLORDER:STRING=FILLORDER_LSB2MSB
//Install Android examples
INSTALL_ANDROID_EXAMPLES:BOOL=OFF
//Change install rules to build the distribution package
INSTALL_CREATE_DISTRIB:BOOL=OFF
//Install C examples
INSTALL_C_EXAMPLES:BOOL=OFF
//Install Python examples
INSTALL_PYTHON_EXAMPLES:BOOL=OFF
//Install accuracy and performance test binaries and test data
INSTALL_TESTS:BOOL=OFF
//Dependencies for the target
IlmImf_LIB_DEPENDS:STATIC=general;z;
//root for library output, set this to change where android libs
// are compiled to
LIBRARY_OUTPUT_PATH_ROOT:PATH=/home/vernium/Documents/source/opencv_android_build_arm64
//Path to a library.
M_LIBRARY:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/platforms/android-14/arch-arm/usr/lib/libm.so
//OpenCL library is found
OPENCL_FOUND:BOOL=ON
//OpenCL include directory
OPENCL_INCLUDE_DIR:PATH=/home/vernium/Documents/source/opencv/3rdparty/include/opencl/1.2
//OpenCL library
OPENCL_LIBRARY:STRING=
//Where to create the platform-dependant cvconfig.h
OPENCV_CONFIG_FILE_INCLUDE_DIR:PATH=/home/vernium/Documents/source/opencv_android_build_arm64
//Build with OpenCL support
OPENCV_DNN_OPENCL:BOOL=ON
//Cache directory for downloaded files
OPENCV_DOWNLOAD_PATH:PATH=/home/vernium/Documents/source/opencv/.cache
//Dump called OpenCV hooks
OPENCV_DUMP_HOOKS_FLOW:BOOL=OFF
//Enable non-free algorithms
OPENCV_ENABLE_NONFREE:BOOL=OFF
//Where to look for additional OpenCV modules (can be ;-separated
// list of paths)
OPENCV_EXTRA_MODULES_PATH:PATH=
//Timestamp of OpenCV build configuration
OPENCV_TIMESTAMP:STRING=2018-07-10T14:43:01Z
//Treat warnings as errors
OPENCV_WARNINGS_ARE_ERRORS:BOOL=OFF
//OpenVX library candidates list
OPENVX_LIB_CANDIDATES:STRING=openvx;vxu
//OpenVX install directory
OPENVX_ROOT:PATH=
//Value Computed by CMake
OpenCV_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64
//The directory containing a CMake configuration file for OpenCV_HAL.
OpenCV_HAL_DIR:PATH=OpenCV_HAL_DIR-NOTFOUND
//Value Computed by CMake
OpenCV_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv
//CXX compiler flags for OpenMP parallelization
OpenMP_CXX_FLAGS:STRING=-fopenmp=libomp
//CXX compiler libraries for OpenMP parallelization
OpenMP_CXX_LIB_NAMES:STRING=libc++_static;libc++abi;omp
//C compiler flags for OpenMP parallelization
OpenMP_C_FLAGS:STRING=-fopenmp=libomp
//C compiler libraries for OpenMP parallelization
OpenMP_C_LIB_NAMES:STRING=omp
//Path to the libc++_static library for OpenMP
OpenMP_libc++_static_LIBRARY:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_static.a
//Path to the libc++abi library for OpenMP
OpenMP_libc++abi_LIBRARY:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++abi.a
//Path to the omp library for OpenMP
OpenMP_omp_LIBRARY:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/6.0.2/lib/linux/aarch64/libomp.a
//Force rebuilding .proto files (protoc should be available)
PROTOBUF_UPDATE_FILES:BOOL=OFF
//Path to Python interpretor
PYTHON2_EXECUTABLE:FILEPATH=/usr/bin/python2.7
//Python include dir
PYTHON2_INCLUDE_DIR:PATH=
//Python include dir 2
PYTHON2_INCLUDE_DIR2:PATH=
//Path to Python library
PYTHON2_LIBRARY:FILEPATH=
//Path to Python debug
PYTHON2_LIBRARY_DEBUG:FILEPATH=
//Path to numpy headers
PYTHON2_NUMPY_INCLUDE_DIRS:PATH=
//Where to install the python packages.
PYTHON2_PACKAGES_PATH:PATH=
//Path to Python interpretor
PYTHON3_EXECUTABLE:FILEPATH=/usr/bin/python3
//Python include dir
PYTHON3_INCLUDE_DIR:PATH=
//Python include dir 2
PYTHON3_INCLUDE_DIR2:PATH=
//Path to Python library
PYTHON3_LIBRARY:FILEPATH=
//Path to Python debug
PYTHON3_LIBRARY_DEBUG:FILEPATH=
//Path to numpy headers
PYTHON3_NUMPY_INCLUDE_DIRS:PATH=
//Where to install the python packages.
PYTHON3_PACKAGES_PATH:PATH=
//Use win32 IO system (Microsoft Windows only)
USE_WIN32_FILEIO:BOOL=OFF
//Include arithmetic decoding support when emulating the libjpeg
// v6b API/ABI
WITH_ARITH_DEC:BOOL=ON
//Include arithmetic encoding support when emulating the libjpeg
// v6b API/ABI
WITH_ARITH_ENC:BOOL=ON
//Use NVidia carotene acceleration library for ARM platform
WITH_CAROTENE:BOOL=ON
//Include Clp support (EPL)
WITH_CLP:BOOL=OFF
//Use cpufeatures Android library
WITH_CPUFEATURES:BOOL=ON
//Include NVidia Cuda Basic Linear Algebra Subprograms (BLAS) library
// support
WITH_CUBLAS:BOOL=ON
//Include NVidia Cuda Runtime support
WITH_CUDA:BOOL=OFF
//Include NVidia Cuda Fast Fourier Transform (FFT) library support
WITH_CUFFT:BOOL=ON
//Include DICOM support
WITH_GDCM:BOOL=OFF
//Enable Gstreamer 0.10 support (instead of 1.x)
WITH_GSTREAMER_0_10:BOOL=OFF
//Include Halide support
WITH_HALIDE:BOOL=OFF
//Include HDR support
WITH_IMGCODEC_HDR:BOOL=ON
//Include PNM (PBM,PGM,PPM) and PAM formats support
WITH_IMGCODEC_PXM:BOOL=ON
//Include SUNRASTER support
WITH_IMGCODEC_SUNRASTER:BOOL=ON
//Include Intel Inference Engine support
WITH_INF_ENGINE:BOOL=OFF
//Include Intel ITT support
WITH_ITT:BOOL=ON
//Include JPEG2K support
WITH_JASPER:BOOL=ON
//Include JPEG support
WITH_JPEG:BOOL=ON
//Include Intel librealsense support
WITH_LIBREALSENSE:BOOL=OFF
//Include NVidia Video Decoding library support
WITH_NVCUVID:BOOL=ON
//Include OpenCL Runtime support
WITH_OPENCL:BOOL=ON
//Include OpenCL Shared Virtual Memory support
WITH_OPENCL_SVM:BOOL=ON
//Include ILM support via OpenEXR
WITH_OPENEXR:BOOL=ON
//Include OpenMP support
WITH_OPENMP:BOOL=ON
//Include OpenVX support
WITH_OPENVX:BOOL=ON
//Include PNG support
WITH_PNG:BOOL=OFF
//Enable libprotobuf
WITH_PROTOBUF:BOOL=ON
//Use pthreads-based parallel_for
WITH_PTHREADS_PF:BOOL=ON
//Include Intel TBB support
WITH_TBB:BOOL=OFF
//Include TIFF support
WITH_TIFF:BOOL=ON
//Include WebP support
WITH_WEBP:BOOL=ON
//Path to a file.
ZLIB_INCLUDE_DIR:PATH=/home/vernium/Android/Sdk/ndk-bundle/sysroot/usr/include
//Path to a library.
ZLIB_LIBRARY_DEBUG:FILEPATH=ZLIB_LIBRARY_DEBUG-NOTFOUND
//Path to a library.
ZLIB_LIBRARY_RELEASE:FILEPATH=/home/vernium/Android/Sdk/ndk-bundle/platforms/android-14/arch-arm/usr/lib/libz.so
//Dependencies for target
carotene_LIB_DEPENDS:STATIC=
//support for CCITT Group 3 & 4 algorithms
ccitt:BOOL=ON
//Dependencies for target
libcpufeatures_LIB_DEPENDS:STATIC=
//Value Computed by CMake
libjasper_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/3rdparty/libjasper
//Dependencies for target
libjasper_LIB_DEPENDS:STATIC=
//Value Computed by CMake
libjasper_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/3rdparty/libjasper
//Value Computed by CMake
libjpeg-turbo_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/3rdparty/libjpeg-turbo
//Dependencies for target
libjpeg-turbo_LIB_DEPENDS:STATIC=
//Value Computed by CMake
libjpeg-turbo_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/3rdparty/libjpeg-turbo
//Value Computed by CMake
libpng_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/3rdparty/libpng
//Dependencies for the target
libpng_LIB_DEPENDS:STATIC=general;z;
//Value Computed by CMake
libpng_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/3rdparty/libpng
//Value Computed by CMake
libprotobuf_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/3rdparty/protobuf
//Dependencies for target
libprotobuf_LIB_DEPENDS:STATIC=
//Value Computed by CMake
libprotobuf_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/3rdparty/protobuf
//Value Computed by CMake
libtiff_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/3rdparty/libtiff
//Dependencies for the target
libtiff_LIB_DEPENDS:STATIC=general;z;
//Value Computed by CMake
libtiff_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/3rdparty/libtiff
//Value Computed by CMake
libwebp_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/3rdparty/libwebp
//Dependencies for the target
libwebp_LIB_DEPENDS:STATIC=general;libcpufeatures;
//Value Computed by CMake
libwebp_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/3rdparty/libwebp
//support for LogLuv high dynamic range algorithm
logluv:BOOL=ON
//support for LZW algorithm
lzw:BOOL=ON
//support for Microsoft Document Imaging
mdi:BOOL=ON
//support for NeXT 2-bit RLE algorithm
next:BOOL=ON
//support for Old JPEG compression (read-only)
old-jpeg:BOOL=OFF
//Value Computed by CMake
opencv_calib3d_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/calib3d
//Dependencies for the target
opencv_calib3d_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_flann;general;opencv_imgproc;general;opencv_imgcodecs;general;opencv_videoio;general;opencv_highgui;general;opencv_features2d;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_calib3d_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/calib3d
//Value Computed by CMake
opencv_core_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/core
//Dependencies for the target
opencv_core_LIB_DEPENDS:STATIC=general;dl;general;m;general;log;general;tegra_hal;general;z;general;libcpufeatures;general;tegra_hal;
//Value Computed by CMake
opencv_core_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/core
//Value Computed by CMake
opencv_dnn_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/dnn
//Dependencies for the target
opencv_dnn_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_imgproc;general;dl;general;m;general;log;general;tegra_hal;general;libprotobuf;
//Add performance tests of Caffe framework
opencv_dnn_PERF_CAFFE:BOOL=OFF
//Add performance tests of clCaffe framework
opencv_dnn_PERF_CLCAFFE:BOOL=OFF
//Value Computed by CMake
opencv_dnn_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/dnn
//Value Computed by CMake
opencv_features2d_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/features2d
//Dependencies for the target
opencv_features2d_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_flann;general;opencv_imgproc;general;opencv_imgcodecs;general;opencv_videoio;general;opencv_highgui;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_features2d_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/features2d
//Value Computed by CMake
opencv_flann_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/flann
//Dependencies for the target
opencv_flann_LIB_DEPENDS:STATIC=general;opencv_core;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_flann_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/flann
//Value Computed by CMake
opencv_highgui_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/highgui
//Dependencies for the target
opencv_highgui_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_imgproc;general;opencv_imgcodecs;general;opencv_videoio;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_highgui_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/highgui
//Value Computed by CMake
opencv_imgcodecs_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/imgcodecs
//Dependencies for the target
opencv_imgcodecs_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_imgproc;general;dl;general;m;general;log;general;tegra_hal;general;z;general;libjpeg-turbo;general;libwebp;general;libpng;general;libtiff;general;libjasper;general;IlmImf;
//Value Computed by CMake
opencv_imgcodecs_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/imgcodecs
//Value Computed by CMake
opencv_imgproc_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/imgproc
//Dependencies for the target
opencv_imgproc_LIB_DEPENDS:STATIC=general;opencv_core;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_imgproc_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/imgproc
//Value Computed by CMake
opencv_java_bindings_generator_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/java_bindings_generator
//Value Computed by CMake
opencv_java_bindings_generator_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/java/generator
//Value Computed by CMake
opencv_ml_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/ml
//Dependencies for the target
opencv_ml_LIB_DEPENDS:STATIC=general;opencv_core;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_ml_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/ml
//Value Computed by CMake
opencv_objdetect_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/objdetect
//Dependencies for the target
opencv_objdetect_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_imgproc;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_objdetect_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/objdetect
//Value Computed by CMake
opencv_photo_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/photo
//Dependencies for the target
opencv_photo_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_imgproc;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_photo_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/photo
//Value Computed by CMake
opencv_python_bindings_generator_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/python_bindings_generator
//Value Computed by CMake
opencv_python_bindings_generator_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/python/bindings
//Value Computed by CMake
opencv_shape_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/shape
//Dependencies for the target
opencv_shape_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_imgproc;general;opencv_video;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_shape_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/shape
//Value Computed by CMake
opencv_stitching_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/stitching
//Dependencies for the target
opencv_stitching_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_flann;general;opencv_imgproc;general;opencv_imgcodecs;general;opencv_videoio;general;opencv_highgui;general;opencv_features2d;general;opencv_calib3d;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_stitching_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/stitching
//Value Computed by CMake
opencv_superres_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/superres
//Dependencies for the target
opencv_superres_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_imgproc;general;opencv_video;general;opencv_imgcodecs;general;opencv_videoio;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_superres_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/superres
//Value Computed by CMake
opencv_ts_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/ts
//Dependencies for the target
opencv_ts_LIB_DEPENDS:STATIC=general;opencv_world;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_ts_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/ts
//Value Computed by CMake
opencv_video_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/video
//Dependencies for the target
opencv_video_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_imgproc;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_video_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/video
//Value Computed by CMake
opencv_videoio_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/videoio
//Dependencies for the target
opencv_videoio_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_imgproc;general;opencv_imgcodecs;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_videoio_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/videoio
//Value Computed by CMake
opencv_videostab_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/videostab
//Dependencies for the target
opencv_videostab_LIB_DEPENDS:STATIC=general;opencv_core;general;opencv_flann;general;opencv_imgproc;general;opencv_photo;general;opencv_video;general;opencv_imgcodecs;general;opencv_videoio;general;opencv_highgui;general;opencv_features2d;general;opencv_calib3d;general;dl;general;m;general;log;general;tegra_hal;
//Value Computed by CMake
opencv_videostab_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/videostab
//Value Computed by CMake
opencv_world_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/modules/world
//Dependencies for the target
opencv_world_LIB_DEPENDS:STATIC=general;dl;general;m;general;log;general;tegra_hal;general;libprotobuf;general;z;general;libjpeg-turbo;general;libwebp;general;libtiff;general;libjasper;general;IlmImf;general;z;general;libcpufeatures;general;tegra_hal;
//Value Computed by CMake
opencv_world_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/modules/world
//Value Computed by CMake
openexr_BINARY_DIR:STATIC=/home/vernium/Documents/source/opencv_android_build_arm64/3rdparty/openexr
//Value Computed by CMake
openexr_SOURCE_DIR:STATIC=/home/vernium/Documents/source/opencv/3rdparty/openexr
//support for Macintosh PackBits algorithm
packbits:BOOL=ON
//Dependencies for target
tegra_hal_LIB_DEPENDS:STATIC=
//support for ThunderScan 4-bit RLE algorithm
thunder:BOOL=ON
Thanks for your help!