5 # https://cmake.org/cmake/help/latest/module/FindJava.html
10 # This module defines the following variables:
20 include(${CMAKE_ROOT}/Modules/FindJava.cmake)
21 if(EXISTS "${Java_JAVAC_EXECUTABLE}" AND Java_JAVAH_EXECUTABLE STREQUAL "Java_JAVAH_EXECUTABLE-NOTFOUND")
22 set(Java_JAVAH_EXECUTABLE "${Java_JAVAC_EXECUTABLE} -h" CACHE FILEPATH "Path to a program." FORCE)
24 if(EXISTS "${Java_JAVA_EXECUTABLE}")
25 get_filename_component(JAVA_EXECUTABLE "${Java_JAVA_EXECUTABLE}" REALPATH)
26 get_filename_component(JAVA_BINDIR "${JAVA_EXECUTABLE}" DIRECTORY)
27 get_filename_component(JAVA_HOME "${JAVA_BINDIR}" DIRECTORY)
28 set(JAVA_LIBDIR "${JAVA_HMOE}/lib")
29 if(NOT DEFINED ENV{JAVA_HOME})
30 set(ENV{JAVA_HOME} "${JAVA_HOME}")