summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiel van Schijndel <giel@mortis.eu>2018-02-27 14:11:49 (GMT)
committerGiel van Schijndel <giel@mortis.eu>2018-02-27 16:32:09 (GMT)
commit596a7f262aa9dd505e4b8f3c3da22e265e38b0ed (patch)
treea615b324e1827828dc1ce7d0b184bcb3601733db
parent464ae1bcc0f3b3264934c1f6c756e5ef919d3f2b (diff)
downloadCMake-596a7f262aa9dd505e4b8f3c3da22e265e38b0ed.zip
CMake-596a7f262aa9dd505e4b8f3c3da22e265e38b0ed.tar.gz
CMake-596a7f262aa9dd505e4b8f3c3da22e265e38b0ed.tar.bz2
FindJava: Add Java_JAR_EXECUTABLE to a component: Development
All discovered executables were placed in a component, except for 'jar'. This forced the use of find_package(Java) without any component specification. This commit adds 'jar' to the 'Development' component, because that's what it's used for.
-rw-r--r--Modules/FindJava.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index e3f5af6..c56c197 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -18,7 +18,7 @@
# ::
#
# Runtime = User just want to execute some Java byte-compiled
-# Development = Development tools (java, javac, javah and javadoc), includes Runtime component
+# Development = Development tools (java, javac, javah, jar and javadoc), includes Runtime component
# IdlJ = idl compiler for Java
# JarSigner = signer tool for jar
#
@@ -237,16 +237,16 @@ if(Java_FIND_COMPONENTS)
endif()
elseif(component STREQUAL "Development")
list(APPEND _JAVA_REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAVAC_EXECUTABLE
- Java_JAVADOC_EXECUTABLE)
+ Java_JAR_EXECUTABLE Java_JAVADOC_EXECUTABLE)
if(Java_VERSION VERSION_LESS "1.10")
list(APPEND _JAVA_REQUIRED_VARS Java_JAVAH_EXECUTABLE)
if(Java_JAVA_EXECUTABLE AND Java_JAVAC_EXECUTABLE
- AND Java_JAVAH_EXECUTABLE AND Java_JAVADOC_EXECUTABLE)
+ AND Java_JAVAH_EXECUTABLE AND Java_JAR_EXECUTABLE AND Java_JAVADOC_EXECUTABLE)
set(Java_Development_FOUND TRUE)
endif()
else()
if(Java_JAVA_EXECUTABLE AND Java_JAVAC_EXECUTABLE
- AND Java_JAVADOC_EXECUTABLE)
+ AND Java_JAR_EXECUTABLE AND Java_JAVADOC_EXECUTABLE)
set(Java_Development_FOUND TRUE)
endif()
endif()