mirror of
https://github.com/opencv/opencv.git
synced 2024-12-17 19:08:01 +08:00
0553543e6e
Android NDK camera support * Add native camera video backend for Android * In the event of a "No buffer available error" wait for the appropriate callback and retry * Fix stale context when creating a new AndroidCameraCapture * Add property handling
9 lines
421 B
CMake
9 lines
421 B
CMake
# if(ANDROID AND ANDROID_NATIVE_API_LEVEL GREATER_EQUAL 24) <-- would be nicer but requires CMake 3.7 or later
|
|
if(ANDROID AND ANDROID_NATIVE_API_LEVEL GREATER 23)
|
|
set(HAVE_ANDROID_NATIVE_CAMERA TRUE)
|
|
set(libs "-landroid -llog -lcamera2ndk")
|
|
ocv_add_external_target(android_native_camera "" "${libs}" "HAVE_ANDROID_NATIVE_CAMERA")
|
|
endif()
|
|
|
|
set(HAVE_ANDROID_NATIVE_CAMERA ${HAVE_ANDROID_NATIVE_CAMERA} PARENT_SCOPE)
|