[CMake] FindJava.cmake update

Romain CHANU romainchanu at gmail.com
Mon Nov 2 09:03:03 EST 2009


1) Yes FindPackageHandleStandardArgs seems to handle that. I was looking
eventually for some way to customize the error message...

2) I did not see the readme.txt, my bad... In this case, I think it is
alright :-) (unless, other developers have comments...). I wanted to have
only the path (not the full path with the executable name) for xjc compiler
(which is installed in the same directory as java, javac, jar, etc. if I am
not wrong). I think I will just do a get_filename_component on the
Java_JAVA_EXECUTABLE.


2009/11/2 Mathieu Malaterre <mathieu.malaterre at gmail.com>

> 'lo,
>
> On Mon, Nov 2, 2009 at 2:35 PM, Romain CHANU <romainchanu at gmail.com>
> wrote:
> > Hello,
> >
> > Regarding the FindJava.cmake, I have a couple of improvements to suggest:
> >
> > 1) I have noticed that there is no JAVA_FOUND variable in the current
> > version (and your version).
>
> I have not tested it, but it seems to me that
> FindPackageHandleStandardArgs.cmake is the one handling the setting of
> this variable IMHO.
>
> > 2) a JAVA_PATH (or another name) could also return the path where the
> Java
> > executables are located.
>
> $ cat Modules/readme.txt
> ...
> XXX_EXECUTABLE          Where to find the XXX tool.
> XXX_YYY_EXECUTABLE      Where to find the YYY tool that comes with XXX.
> ...
>
> I decided to go for: Java_JAVA_EXECUTABLE / Java_JAVAC_EXECUTABLE/
> Java_JAR_EXECUTABLE. It make it easier to write in a foreach loop. I
> could leave them as such and add a Java_EXECUTABLE.
>
> Comments ?
> --
> Mathieu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091102/27cb649a/attachment.htm>


More information about the CMake mailing list