Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | Upstream-status: Inappropriate [OE specific] https://github.com/opencv/opencv/pull/10039#issuecomment-342539288 |
| 2 | |
| 3 | Signed-off-by: Ricardo Ribalda <ricardo.ribalda@gmail.com> |
| 4 | diff --git a/modules/java/CMakeLists.txt b/modules/java/CMakeLists.txt |
| 5 | index 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}" |