1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-18 17:31:57 +08:00

Java: Create java_class_filelist only if it does't exist.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Oliver Buchtala
2011-04-03 00:21:44 +02:00
committed by Andreas Schneider
parent a22ed3d62d
commit f3233ba521

View File

@@ -285,7 +285,9 @@ function(add_jar _TARGET_NAME)
endforeach(_JAVA_SOURCE_FILE)
# create an empty java_class_filelist
file(WRITE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist "")
if (NOT EXISTS ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist)
file(WRITE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist "")
endif()
# Add the target and make sure we have the latest resource files.
add_custom_target(${_TARGET_NAME} ALL DEPENDS ${_JAVA_RESOURCE_FILES} ${_JAVA_DEPENDS})