diff --git a/modules/java/android_sdk/CMakeLists.txt b/modules/java/android_sdk/CMakeLists.txt index 945dcf2b54..c45251bd68 100644 --- a/modules/java/android_sdk/CMakeLists.txt +++ b/modules/java/android_sdk/CMakeLists.txt @@ -118,7 +118,9 @@ foreach(file ${seed_project_files_rel}) configure_file("${__base_dir}/${file}" "${OPENCV_JAVA_DIR}/${file}" @ONLY) list(APPEND depends "${__base_dir}/${file}") get_filename_component(install_subdir "${file}" PATH) - install(FILES "${OPENCV_JAVA_DIR}/${file}" DESTINATION "${JAVA_INSTALL_ROOT}/${install_subdir}" COMPONENT java) + if(NOT file STREQUAL "build.gradle") + install(FILES "${OPENCV_JAVA_DIR}/${file}" DESTINATION "${JAVA_INSTALL_ROOT}/${install_subdir}" COMPONENT java) + endif() endforeach() list(APPEND depends gen_opencv_java_source "${OPENCV_DEPHELPER}/gen_opencv_java_source")