|
|
|
@ -175,6 +175,7 @@ macro(android_get_compatible_target VAR) |
|
|
|
|
endif() |
|
|
|
|
endmacro() |
|
|
|
|
|
|
|
|
|
unset(__android_project_chain CACHE) |
|
|
|
|
#add_android_project(target_name ${path} NATIVE_DEPS opencv_core LIBRARY_DEPS ${OpenCV_BINARY_DIR} SDK_TARGET 11) |
|
|
|
|
macro(add_android_project target path) |
|
|
|
|
# parse arguments |
|
|
|
@ -288,17 +289,18 @@ macro(add_android_project target path) |
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E touch "${android_proj_bin_dir}/bin/${target}-debug.apk" # needed because ant does not update the timestamp of updated apk |
|
|
|
|
WORKING_DIRECTORY "${android_proj_bin_dir}" |
|
|
|
|
MAIN_DEPENDENCY "${android_proj_bin_dir}/${ANDROID_MANIFEST_FILE}" |
|
|
|
|
DEPENDS ${android_proj_file_deps} ${JNI_LIB_NAME}) |
|
|
|
|
DEPENDS ${android_proj_file_deps} ${JNI_LIB_NAME} ${__android_project_chain}) |
|
|
|
|
else() |
|
|
|
|
add_custom_command( |
|
|
|
|
OUTPUT "${android_proj_bin_dir}/bin/${target}-debug.apk" |
|
|
|
|
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug |
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E touch "${android_proj_bin_dir}/bin/${target}-debug.apk" # needed because ant does not update the timestamp of updated apk |
|
|
|
|
WORKING_DIRECTORY "${android_proj_bin_dir}" |
|
|
|
|
MAIN_DEPENDENCY "${android_proj_bin_dir}/${ANDROID_MANIFEST_FILE}" |
|
|
|
|
DEPENDS "${OpenCV_BINARY_DIR}/bin/classes.jar" opencv_java # as we are part of OpenCV we can just force this dependency |
|
|
|
|
DEPENDS ${android_proj_file_deps} ${JNI_LIB_NAME}) |
|
|
|
|
add_custom_command( |
|
|
|
|
OUTPUT "${android_proj_bin_dir}/bin/${target}-debug.apk" |
|
|
|
|
COMMAND ${ANT_EXECUTABLE} -q -noinput -k debug |
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E touch "${android_proj_bin_dir}/bin/${target}-debug.apk" # needed because ant does not update the timestamp of updated apk |
|
|
|
|
WORKING_DIRECTORY "${android_proj_bin_dir}" |
|
|
|
|
MAIN_DEPENDENCY "${android_proj_bin_dir}/${ANDROID_MANIFEST_FILE}" |
|
|
|
|
DEPENDS "${OpenCV_BINARY_DIR}/bin/.classes.jar.dephelper" opencv_java # as we are part of OpenCV we can just force this dependency |
|
|
|
|
DEPENDS ${android_proj_file_deps} ${JNI_LIB_NAME} ${__android_project_chain}) |
|
|
|
|
endif() |
|
|
|
|
set(__android_project_chain ${target} CACHE INTERNAL "auxiliary variable used for Android progects chaining") |
|
|
|
|
|
|
|
|
|
unset(JNI_LIB_NAME) |
|
|
|
|
|
|
|
|
|