<div class="gmail_quote">On Tue, Apr 5, 2011 at 7:16 AM, Oliver Buchtala <span dir="ltr">&lt;<a href="mailto:oliver.buchtala@jku.at">oliver.buchtala@jku.at</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Am 05.04.2011 13:12, schrieb Oliver Buchtala:<div class="im"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I am working with CMake 2.8 and using UseJNI.cmake<br>
I have a JDK installed locally (registered in Win-Registry) but want to configure a project to use a different JDK lying on my disk.<br>
<br>
Looking at UseJNI.cmake I find that the environment variable JAVA_HOME could be handy,<br>
but unfortunately UseJNI prefers the Windows-Registry entries above all other search paths.<br>
<br>
Did I miss something?<br>
Shall I file an issue?<br>
<br>
Oliver<br>
<br>
</blockquote></div>
Sorry, the macro file is called FindJNI.cmake.<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br>The only find_* calls I see in FindJNI.cmake are:<br><br>  FIND_LIBRARY(JAVA_AWT_LIBRARY jawt <br>  FIND_LIBRARY(JAVA_JVM_LIBRARY NAMES jvm JavaVM<br>  FIND_PATH(JAVA_INCLUDE_PATH jni.h <br>
  FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h <br>  FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h<br><br>If you want to override the default locations to find a specific installation of java stuff, just set those variables in your cache to point to the right stuff before calling find_package(JNI).<br>
<br>For example:<br>  set(JAVA_AWT_LIBRARY &quot;/full/path/to/libjawt.a&quot; CACHE FILEPATH &quot;jawt library&quot;)<br>  find_package(JNI)<br><br>If a variable is already set before calling a find_* command, then the find is a no-op and it trusts that you&#39;ve set it correctly.<br>
<br><br>HTH,<br>David<br><br>