diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-30 14:17:00 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-10-30 14:17:00 (GMT) |
commit | 676ed21c66b7e4297f655110e2164ff22916127c (patch) | |
tree | 746df41197f5e9d3106a1e77648ffb63b51f079f | |
parent | bf29553686ce4a93e2dd03169c6c2c166e226aed (diff) | |
download | CMake-676ed21c66b7e4297f655110e2164ff22916127c.zip CMake-676ed21c66b7e4297f655110e2164ff22916127c.tar.gz CMake-676ed21c66b7e4297f655110e2164ff22916127c.tar.bz2 |
ENH: move from main tree
-rw-r--r-- | Modules/FindJNI.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index 781fecd..694bc96 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -4,7 +4,9 @@ # the library is. This code sets the following variables: # # JAVA_AWT_LIB_PATH = the path to the jawt library +# JAVA_JVM_LIB_PATH = the path to the jvm library # JAVA_INCLUDE_PATH = the include path to jni.h +# JAVA_INCLUDE_PATH2 = the include path to jni.h # JAVA_AWT_INCLUDE_PATH = the include path to jawt.h # @@ -28,6 +30,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 +83,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 +96,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 @@ -98,6 +117,7 @@ FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h MARK_AS_ADVANCED( JAVA_AWT_LIBRARY + JAVA_JVM_LIBRARY JAVA_AWT_INCLUDE_PATH JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 |