summaryrefslogtreecommitdiffstats
path: root/Modules/UseJava.cmake
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2019-12-08 00:39:02 (GMT)
committerAlex Turbov <i.zaufi@gmail.com>2019-12-10 14:43:27 (GMT)
commit24fdd51f4503ccee33c07881cc8dd487cdc8b347 (patch)
treeff07504a0782e3a79fb996594d9fcbcabf98ecf0 /Modules/UseJava.cmake
parent90e3e2a7778dc0ec5b421e9657ec49936a3cf174 (diff)
downloadCMake-24fdd51f4503ccee33c07881cc8dd487cdc8b347.zip
CMake-24fdd51f4503ccee33c07881cc8dd487cdc8b347.tar.gz
CMake-24fdd51f4503ccee33c07881cc8dd487cdc8b347.tar.bz2
Refactor: Replace CMAKE_CURRENT_LIST_DIR with CMAKE_CURRENT_FUNCTION_LIST_DIR
Some modules define an intermediate global scope visible variables to access "resource" files from functions. Now these variables could be eliminated.
Diffstat (limited to 'Modules/UseJava.cmake')
-rw-r--r--Modules/UseJava.cmake3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 0798488..a73fc2a 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -405,7 +405,6 @@ endfunction()
# define helper scripts
set(_JAVA_EXPORT_TARGETS_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/javaTargets.cmake.in)
-set(_JAVA_CLASS_FILELIST_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/UseJavaClassFilelist.cmake)
set(_JAVA_SYMLINK_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/UseJavaSymlinks.cmake)
function(add_jar _TARGET_NAME)
@@ -627,7 +626,7 @@ function(add_jar _TARGET_NAME)
COMMAND ${CMAKE_COMMAND}
-DCMAKE_JAVA_CLASS_OUTPUT_PATH=${CMAKE_JAVA_CLASS_OUTPUT_PATH}
-DCMAKE_JAR_CLASSES_PREFIX="${CMAKE_JAR_CLASSES_PREFIX}"
- -P ${_JAVA_CLASS_FILELIST_SCRIPT}
+ -P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/UseJavaClassFilelist.cmake
DEPENDS ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)