blob: 56526ecd80a85a59185e40d18243bff6bacae423 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001Upstream-status: Inappropriate [OE specific] https://github.com/opencv/opencv/pull/10039#issuecomment-342539288
2
3Signed-off-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
4diff --git a/modules/java/CMakeLists.txt b/modules/java/CMakeLists.txt
5index 74bc0ef04169..4622fbf9a5f1 100644
6--- a/modules/java/CMakeLists.txt
7+++ b/modules/java/CMakeLists.txt
8@@ -291,7 +291,7 @@ foreach(java_file ${step3_input_files})
9 endif()
10 if(__configure)
11 configure_file("${java_file}" "${java_src_dir}/${output_name}" @ONLY)
12- elseif(NOT "${java_file}" MATCHES "${OpenCV_BINARY_DIR}/")
13+ elseif(EXISTS "${java_file}" AND NOT "${java_file}" MATCHES "${OpenCV_BINARY_DIR}/")
14 configure_file("${java_file}" "${java_src_dir}/${output_name}" COPYONLY)
15 else()
16 add_custom_command(OUTPUT "${java_src_dir}/${output_name}"