diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-12-17 22:22:51 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-12-17 22:22:51 (GMT) |
commit | d6bf2457a7f64f6e378ada89219c013a4a65fa02 (patch) | |
tree | 873eccc9e58b0c67be016bf2b1eb857672741747 /Modules | |
parent | 46fff6c83a4d5d46ec2e48e70dbb8bee542c28ea (diff) | |
download | CMake-d6bf2457a7f64f6e378ada89219c013a4a65fa02.zip CMake-d6bf2457a7f64f6e378ada89219c013a4a65fa02.tar.gz CMake-d6bf2457a7f64f6e378ada89219c013a4a65fa02.tar.bz2 |
BUG: fix for 5933, look for java in more reg entries
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindJNI.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index f3b65d4..a4b6f93 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -9,10 +9,13 @@ # JAVA_INCLUDE_PATH2 = the include path to jni_md.h # JAVA_AWT_INCLUDE_PATH = the include path to jawt.h # - +GET_FILENAME_COMPONENT(java_install_version + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit;CurrentVersion]" NAME) +message("${java_install_version}") SET(JAVA_AWT_LIBRARY_DIRECTORIES "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/lib" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/lib" $ENV{JAVA_HOME}/jre/lib/i386 $ENV{JAVA_HOME}/jre/lib/amd64 /usr/lib @@ -44,6 +47,7 @@ ENDFOREACH(dir) SET(JAVA_AWT_INCLUDE_DIRECTORIES "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/include" "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/include" $ENV{JAVA_HOME}/include /usr/include /usr/local/include |