<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Am 05.04.2011 17:11, schrieb Oliver Buchtala:
<blockquote cite="mid:4D9B3108.70709@jku.at" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
Am 05.04.2011 16:33, schrieb David Cole:
<blockquote
cite="mid:BANLkTimkWztcABMVbLSF3qVGoZDjZ2Lh-w@mail.gmail.com"
type="cite">
<div class="gmail_quote">On Tue, Apr 5, 2011 at 7:16 AM, Oliver
Buchtala <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:oliver.buchtala@jku.at">oliver.buchtala@jku.at</a>></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 class="h5"><br>
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true"
href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a
moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 "/full/path/to/libjawt.a" CACHE FILEPATH
"jawt library")<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've set it
correctly.<br>
<br>
<br>
HTH,<br>
David<br>
<br>
</blockquote>
Hi David,<br>
<br>
ok. I thought it could even be easier ;) <br>
If I disable the win-Registry lookup stuff and set JAVA_HOME
appropriately then everything is found perfectly.<br>
And if disabling would be just changing the order of search paths
this would be more control for me and still powerful (i.e., when
not using JAVA_HOME).<br>
Nevertheless, I can also live with your suggestion...<br>
<br>
Thank you,<br>
Oliver<br>
<br>
<pre wrap="">
</pre>
</blockquote>
Hi David,<br>
<br>
Thinking it over again, I am getting to like it less...<br>
Setting these variables is in fact the stuff that FindJNI does.<br>
<br>
For now I will live with a monkey patched version that allows
disabling the registry search stuff.<br>
Is this an option for the core FindJNI.cmake too - i.e., introducing
a means to disable win registry search?<br>
<br>
Bye,<br>
Oliver<br>
<br>
</body>
</html>