From 807ec00b857651a75e633c6f330a30c77590bdde Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 20 Feb 2018 13:13:31 +0300 Subject: [PATCH] cmake: fix Ninja warning about BYPRODUCTS bin/opencv-340.jar --- modules/java/jar/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/java/jar/CMakeLists.txt b/modules/java/jar/CMakeLists.txt index 4771900848..d34a8e26bf 100644 --- a/modules/java/jar/CMakeLists.txt +++ b/modules/java/jar/CMakeLists.txt @@ -21,7 +21,9 @@ set(depends ${the_module}_jar_source_copy "${OPENCV_DEPHELPER}/${the_module}_jar configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build.xml.in" "${OPENCV_JAVA_DIR}/build.xml" @ONLY) list(APPEND depends "${OPENCV_JAVA_DIR}/build.xml") +ocv_cmake_byproducts(__byproducts BYPRODUCTS "${OPENCV_JAR_FILE}") add_custom_command(OUTPUT "${OPENCV_DEPHELPER}/${the_module}_jar" + ${__byproducts} # required for add_custom_target() by ninja COMMAND ${ANT_EXECUTABLE} -noinput -k jar COMMAND ${CMAKE_COMMAND} -E touch "${OPENCV_DEPHELPER}/${the_module}_jar" WORKING_DIRECTORY "${OPENCV_JAVA_DIR}"