Sync CMake java macros with cmake repo (#982)

This commit is contained in:
Allen Byrne
2021-09-07 08:18:53 -05:00
committed by GitHub
parent f679c6ea28
commit 216f5ba65e
5 changed files with 545 additions and 377 deletions

View File

@@ -1,17 +1,8 @@
# Distributed under the OSI-approved BSD 3-Clause License. See https://cmake.org/licensing for details.
#[=======================================================================[.rst:
UseJavaClassFilelist
--------------------
This script create a list of compiled Java class files to be added to
a jar file. This avoids including cmake files which get created in
the binary directory.
#]=======================================================================]
# This script creates a list of compiled Java class files to be added to
# a jar file. This avoids including cmake files which get created in
# the binary directory.
if (CMAKE_JAVA_CLASS_OUTPUT_PATH)
if (EXISTS "${CMAKE_JAVA_CLASS_OUTPUT_PATH}")
@@ -23,7 +14,7 @@ if (CMAKE_JAVA_CLASS_OUTPUT_PATH)
file(GLOB_RECURSE _JAVA_GLOBBED_TMP_FILES "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${JAR_CLASS_PREFIX}/*.class")
if (_JAVA_GLOBBED_TMP_FILES)
list (APPEND _JAVA_GLOBBED_FILES ${_JAVA_GLOBBED_TMP_FILES})
list(APPEND _JAVA_GLOBBED_FILES ${_JAVA_GLOBBED_TMP_FILES})
endif ()
endforeach()
else()