summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-10-27 21:29:05 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-10-27 21:29:05 (GMT)
commit9ae7fb964c127abbc3861cbd5c28e3ba9a746ddb (patch)
tree0057c18141ff4fd28f2ee7e6e5e462c871243388 /Modules
parentf23ade5c02f84464ad4488491cd02180c768e62c (diff)
downloadCMake-9ae7fb964c127abbc3861cbd5c28e3ba9a746ddb.zip
CMake-9ae7fb964c127abbc3861cbd5c28e3ba9a746ddb.tar.gz
CMake-9ae7fb964c127abbc3861cbd5c28e3ba9a746ddb.tar.bz2
ENH: Add support for libjvm
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindJNI.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 781fecd..a0f9266 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -28,6 +28,17 @@ SET(JAVA_AWT_LIBRARY_DIRECTORIES
/usr/lib/j2sdk1.5-sun/jre/lib/amd64
)
+SET(JAVA_JVM_LIBRARY_DIRECTORIES)
+FOREACH(dir ${JAVA_AWT_LIBRARY_DIRECTORIES})
+ SET(JAVA_JVM_LIBRARY_DIRECTORIES
+ ${JAVA_JVM_LIBRARY_DIRECTORIES}
+ "${dir}"
+ "${dir}/client"
+ "${dir}/server"
+ )
+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"
@@ -70,6 +81,9 @@ IF(APPLE)
IF(NOT JAVA_AWT_LIBRARY)
SET (JAVA_AWT_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
ENDIF(NOT JAVA_AWT_LIBRARY)
+ IF(NOT JAVA_JVM_LIBRARY)
+ SET (JAVA_JVM_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE)
+ ENDIF(NOT JAVA_JVM_LIBRARY)
SET(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES}
~/Library/Frameworks/JavaVM.framework/Headers
/Library/Frameworks/JavaVM.framework/Headers
@@ -80,6 +94,9 @@ ELSE(APPLE)
FIND_LIBRARY(JAVA_AWT_LIBRARY jawt
PATHS ${JAVA_AWT_LIBRARY_DIRECTORIES}
)
+ FIND_LIBRARY(JAVA_JVM_LIBRARY jvm
+ PATHS ${JAVA_JVM_LIBRARY_DIRECTORIES}
+ )
ENDIF(APPLE)
# add in the include path