mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
Enable Android samples with native part with AAR package
This commit is contained in:
parent
ea94f7eba9
commit
c0680ae846
@ -221,20 +221,9 @@ include ':${__dir}'
|
|||||||
configure_file("${path}/build.gradle.in" "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" @ONLY)
|
configure_file("${path}/build.gradle.in" "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" @ONLY)
|
||||||
install(FILES "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples)
|
install(FILES "${ANDROID_TMP_INSTALL_BASE_DIR}/${__dir}/build.gradle" DESTINATION "${ANDROID_INSTALL_SAMPLES_DIR}/${__dir}" COMPONENT samples)
|
||||||
|
|
||||||
# HACK: AAR packages generated from current OpenCV project has incomple prefab part
|
file(APPEND "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
|
||||||
# and cannot be used for native linkage against OpenCV.
|
|
||||||
# Alternative way to build AAR: https://github.com/opencv/opencv/blob/4.x/platforms/android/build_java_shared_aar.py
|
|
||||||
if("${__dir}" STREQUAL "tutorial-2-mixedprocessing" OR "${__dir}" STREQUAL "tutorial-4-opencl")
|
|
||||||
file(APPEND "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
|
|
||||||
if (gradle.opencv_source == 'sdk_path') {
|
|
||||||
include ':${__dir}'
|
|
||||||
}
|
|
||||||
")
|
|
||||||
else()
|
|
||||||
file(APPEND "${ANDROID_TMP_INSTALL_BASE_DIR}/settings.gradle" "
|
|
||||||
include ':${__dir}'
|
include ':${__dir}'
|
||||||
")
|
")
|
||||||
endif()
|
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user