mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 05:10:10 -05:00
FindJNI: Support finding libjvm.so for all OpenJDK variants
Formerly only the "client" and "server" variant directories are being checked for libjvm.so, but according to a 2021 OpenJDK upstream change present in OpenJDK >= 18, there can be "minimal" and "zero" variants as well. In particular, formerly (OpenJDK <= 17) the Zero variant had its libjvm.so in "server/", but "zero/" in newer versions, which regressed downstream CMake project builds running on systems with OpenJDK Zero VM. Fix it by checking all 4 variant directories for libjvm.so. Link: https://bugs.openjdk.org/browse/JDK-8273494 Link: https://github.com/openjdk/jdk/pull/5440 Link: https://github.com/openjdk/jdk/commit/8fbcc8239a3fc04e56ebbd287c7bb5db731977b7 Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1078446
This commit is contained in:
@@ -343,7 +343,9 @@ foreach(dir IN LISTS JAVA_AWT_LIBRARY_DIRECTORIES)
|
|||||||
list(APPEND JAVA_JVM_LIBRARY_DIRECTORIES
|
list(APPEND JAVA_JVM_LIBRARY_DIRECTORIES
|
||||||
"${dir}"
|
"${dir}"
|
||||||
"${dir}/client"
|
"${dir}/client"
|
||||||
|
"${dir}/minimal"
|
||||||
"${dir}/server"
|
"${dir}/server"
|
||||||
|
"${dir}/zero"
|
||||||
# IBM SDK, Java Technology Edition, specific paths
|
# IBM SDK, Java Technology Edition, specific paths
|
||||||
"${dir}/j9vm"
|
"${dir}/j9vm"
|
||||||
"${dir}/default"
|
"${dir}/default"
|
||||||
|
|||||||
Reference in New Issue
Block a user