FindJava: Find missing java development executables.

This commit is contained in:
Andreas Schneider 2011-02-10 21:09:29 +01:00
parent ffae462ae6
commit a4b6275eb7
1 changed files with 18 additions and 0 deletions

View File

@ -5,6 +5,8 @@
# #
# Java_JAVA_EXECUTABLE = the full path to the Java runtime # Java_JAVA_EXECUTABLE = the full path to the Java runtime
# Java_JAVAC_EXECUTABLE = the full path to the Java compiler # Java_JAVAC_EXECUTABLE = the full path to the Java compiler
# Java_JAVAH_EXECUTABLE = the full path to the Java header generator
# Java_JAVADOC_EXECUTABLE = the full path to the Java documention generator
# Java_JAR_EXECUTABLE = the full path to the Java archiver # Java_JAR_EXECUTABLE = the full path to the Java archiver
# Java_VERSION_STRING = Version of the package found (java version), eg. 1.6.0_12 # Java_VERSION_STRING = Version of the package found (java version), eg. 1.6.0_12
# Java_VERSION_MAJOR = The major version of the package found. # Java_VERSION_MAJOR = The major version of the package found.
@ -150,6 +152,18 @@ FIND_PROGRAM(Java_JAVAC_EXECUTABLE
PATHS ${_JAVA_PATHS} PATHS ${_JAVA_PATHS}
) )
FIND_PROGRAM(Java_JAVAH_EXECUTABLE
NAMES javah
HINTS ${_JAVA_HINTS}
PATHS ${_JAVA_PATHS}
)
FIND_PROGRAM(Java_JAVADOC_EXECUTABLE
NAMES javadoc
HINTS ${_JAVA_HINTS}
PATHS ${_JAVA_PATHS}
)
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
if(Java_FIND_COMPONENTS) if(Java_FIND_COMPONENTS)
foreach(component ${Java_FIND_COMPONENTS}) foreach(component ${Java_FIND_COMPONENTS})
@ -162,6 +176,7 @@ if(Java_FIND_COMPONENTS)
elseif(component STREQUAL "Development") elseif(component STREQUAL "Development")
find_package_handle_standard_args(Java find_package_handle_standard_args(Java
REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE
Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE
VERSION_VAR Java_VERSION VERSION_VAR Java_VERSION
) )
else() else()
@ -173,6 +188,7 @@ else()
# Check for everything # Check for everything
find_package_handle_standard_args(Java find_package_handle_standard_args(Java
REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE REQUIRED_VARS Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE
Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE
VERSION_VAR Java_VERSION VERSION_VAR Java_VERSION
) )
endif() endif()
@ -182,6 +198,8 @@ MARK_AS_ADVANCED(
Java_JAVA_EXECUTABLE Java_JAVA_EXECUTABLE
Java_JAR_EXECUTABLE Java_JAR_EXECUTABLE
Java_JAVAC_EXECUTABLE Java_JAVAC_EXECUTABLE
Java_JAVAH_EXECUTABLE
Java_JAVADOC_EXECUTABLE
) )
# LEGACY # LEGACY