Skip to content

Commit 807ec00

Browse files
committed
cmake: fix Ninja warning
about BYPRODUCTS bin/opencv-340.jar
1 parent 53305d4 commit 807ec00

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/java/jar/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ set(depends ${the_module}_jar_source_copy "${OPENCV_DEPHELPER}/${the_module}_jar
2121
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/build.xml.in" "${OPENCV_JAVA_DIR}/build.xml" @ONLY)
2222
list(APPEND depends "${OPENCV_JAVA_DIR}/build.xml")
2323

24+
ocv_cmake_byproducts(__byproducts BYPRODUCTS "${OPENCV_JAR_FILE}")
2425
add_custom_command(OUTPUT "${OPENCV_DEPHELPER}/${the_module}_jar"
26+
${__byproducts} # required for add_custom_target() by ninja
2527
COMMAND ${ANT_EXECUTABLE} -noinput -k jar
2628
COMMAND ${CMAKE_COMMAND} -E touch "${OPENCV_DEPHELPER}/${the_module}_jar"
2729
WORKING_DIRECTORY "${OPENCV_JAVA_DIR}"

0 commit comments

Comments
 (0)