--- cmake-3.25.3.old/Modules/FindJava.cmake +++ cmake-3.25.3/Modules/FindJava.cmake @@ -137,7 +137,7 @@ /usr/local/jdk-1.6.0/bin ) find_program(Java_JAVA_EXECUTABLE - NAMES java + NAMES dontfindjava HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) @@ -236,25 +236,25 @@ find_program(Java_JAR_EXECUTABLE - NAMES jar + NAMES dontfindjar HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) find_program(Java_JAVAC_EXECUTABLE - NAMES javac + NAMES dontfindjavac HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) find_program(Java_JAVAH_EXECUTABLE - NAMES javah + NAMES dontfindjavah HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) find_program(Java_JAVADOC_EXECUTABLE - NAMES javadoc + NAMES dontfindjavadoc HINTS ${_JAVA_HINTS} PATHS ${_JAVA_PATHS} ) --- cmake-3.25.3.old/Tests/CMakeLists.txt +++ cmake-3.25.3/Tests/CMakeLists.txt @@ -3401,7 +3401,7 @@ get_filename_component(JAVACPATH ${Java_JAVAC_EXECUTABLE} REALPATH) get_filename_component(JNIPATH ${JAVACPATH} PATH) - find_file(JNI_H jni.h + find_file(JNI_H dontfindjni.h "${JNIPATH}/../include" "${JNIPATH}/../java/include") if(JNI_H AND EXISTS "${JNI_H}") # in case jni.h is a broken symlink