summaryrefslogtreecommitdiffstats
path: root/Modules/FindJNI.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-12-17 22:22:51 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-12-17 22:22:51 (GMT)
commitd6bf2457a7f64f6e378ada89219c013a4a65fa02 (patch)
tree873eccc9e58b0c67be016bf2b1eb857672741747 /Modules/FindJNI.cmake
parent46fff6c83a4d5d46ec2e48e70dbb8bee542c28ea (diff)
downloadCMake-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/FindJNI.cmake')
-rw-r--r--Modules/FindJNI.cmake6
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