summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-02-11 19:49:11 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-02-11 19:49:11 (GMT)
commitfd89ebbbaf2e36589aad3c0b80e2ddb0a3605763 (patch)
treeaa58da4bffcaca435f25d27b6281d049fc2efbfb /Modules
parent5a31a94f848288e768dbc0a95a0f331529dbbd55 (diff)
downloadCMake-fd89ebbbaf2e36589aad3c0b80e2ddb0a3605763.zip
CMake-fd89ebbbaf2e36589aad3c0b80e2ddb0a3605763.tar.gz
CMake-fd89ebbbaf2e36589aad3c0b80e2ddb0a3605763.tar.bz2
Ok, now it finds JNI on Mac OSX 10.2
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindJNI.cmake24
1 files changed, 14 insertions, 10 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index d87706f..e708844 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -26,10 +26,6 @@ SET(JAVA_AWT_INCLUDE_DIRECTORIES
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/include"
)
-FIND_LIBRARY(JAVA_AWT_LIBRARY jawt
- PATHS ${JAVA_AWT_LIBRARY_DIRECTORIES}
-)
-
IF(APPLE)
IF(EXISTS ~/Library/Frameworks/JavaEmbedding.framework)
SET(JAVA_HAVE_FRAMEWORK 1)
@@ -43,13 +39,20 @@ IF(APPLE)
IF(JAVA_HAVE_FRAMEWORK)
IF(NOT JAVA_AWT_LIBRARY)
SET (JAVA_AWT_LIBRARY "-framework JavaVM -framework JavaEmbedding" CACHE FILEPATH "Java Frameworks" FORCE)
- SET(JAVA_AWT_INCLUDE_DIRECTORIES
- ~/Library/Frameworks/JavaEmbedding.framework/Headers
- /Library/Frameworks/JavaEmbedding.framework/Headers
- /System/Library/Frameworks/JavaEmbedding.framework/Headers
- )
ENDIF(NOT JAVA_AWT_LIBRARY)
+ SET(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES}
+ ~/Library/Frameworks/JavaVM.framework/Headers
+ /Library/Frameworks/JavaVM.framework/Headers
+ /System/Library/Frameworks/JavaVM.framework/Headers
+ ~/Library/Frameworks/JavaEmbedding.framework/Headers
+ /Library/Frameworks/JavaEmbedding.framework/Headers
+ /System/Library/Frameworks/JavaEmbedding.framework/Headers
+ )
ENDIF(JAVA_HAVE_FRAMEWORK)
+ELSE(APPLE)
+ FIND_LIBRARY(JAVA_AWT_LIBRARY jawt
+ PATHS ${JAVA_AWT_LIBRARY_DIRECTORIES}
+ )
ENDIF(APPLE)
# add in the include path
@@ -63,7 +66,8 @@ FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h
${JAVA_INCLUDE_PATH}/linux
)
-FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h ${JAVA_INCLUDE_PATH} )
+FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h
+ ${JAVA_AWT_INCLUDE_DIRECTORIES} ${JAVA_INCLUDE_PATH} )
MARK_AS_ADVANCED(
JAVA_AWT_LIBRARY