UseJava: add_jar: rebuild jar on dependencies changes

Fixes: #18683
This commit is contained in:
Marc Chevrier 2018-12-11 15:17:24 +01:00
parent cb995ddea2
commit 5aa88f0e02

View File

@ -644,7 +644,7 @@ function(add_jar _TARGET_NAME)
string(APPEND CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_FLAG_SEP}${_JAVA_JAR_PATH}")
list(APPEND CMAKE_JAVA_INCLUDE_PATH ${_JAVA_JAR_PATH})
list(APPEND _JAVA_DEPENDS ${_JAVA_INCLUDE_JAR})
list(APPEND _JAVA_COMPILE_DEPENDS ${_JAVA_INCLUDE_JAR})
list(APPEND _JAVA_COMPILE_DEPENDS ${_JAVA_JAR_PATH})
else ()
message(SEND_ERROR "add_jar: INCLUDE_JARS target ${_JAVA_INCLUDE_JAR} is not a jar")
endif ()