diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-02-06 15:49:46 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-02-06 15:49:46 (GMT) |
commit | f171b823770b44f4d06f66ec87d5ae2ab2210a25 (patch) | |
tree | 461121d090b58f08705ccf4761233913790b1a52 /Modules | |
parent | 575595071776c751acc9338563e091b69785db35 (diff) | |
download | CMake-f171b823770b44f4d06f66ec87d5ae2ab2210a25.zip CMake-f171b823770b44f4d06f66ec87d5ae2ab2210a25.tar.gz CMake-f171b823770b44f4d06f66ec87d5ae2ab2210a25.tar.bz2 |
ENH: Better finding of JNI
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindJNI.cmake | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake index a8dd17e..b4c6cde 100644 --- a/Modules/FindJNI.cmake +++ b/Modules/FindJNI.cmake @@ -26,6 +26,23 @@ SET(JAVA_AWT_INCLUDE_DIRECTORIES /usr/local/lib/java/include ) +FOREACH(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}") + GET_FILENAME_COMPONENT(jpath "${JAVA_PROG}" PATH) + FOREACH(JAVA_INC_PATH ../include ../java/include ../share/java/include) + IF(EXISTS ${jpath}/${JAVA_INC_PATH}) + SET(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES} "${jpath}/${JAVA_INC_PATH}") + ENDIF(EXISTS ${jpath}/${JAVA_INC_PATH}) + ENDFOREACH(JAVA_INC_PATH) + FOREACH(JAVA_LIB_PATH + ../lib ../jre/lib ../jre/lib/i386 + ../java/lib ../java/jre/lib ../java/jre/lib/i386 + ../share/java/lib ../share/java/jre/lib ../share/java/jre/lib/i386) + IF(EXISTS ${jpath}/${JAVA_LIB_PATH}) + SET(JAVA_AWT_LIBRARY_DIRECTORIES ${JAVA_AWT_LIBRARY_DIRECTORIES} "${jpath}/${JAVA_LIB_PATH}") + ENDIF(EXISTS ${jpath}/${JAVA_LIB_PATH}) + ENDFOREACH(JAVA_LIB_PATH) +ENDFOREACH(JAVA_PROG) + IF(APPLE) IF(EXISTS ~/Library/Frameworks/JavaEmbedding.framework) SET(JAVA_HAVE_FRAMEWORK 1) |