[CMake] Is there a tool pretty much like cmake for Java?

Michał Czuczman biurku at gmail.com
Thu Oct 14 16:22:07 EDT 2010


On 2010-10-07, 12:57:50, Bill Hoffman wrote:

> On 10/7/2010 12:37 PM, Ryan Pavlik wrote:
> >**>**>* On 10/07/2010 09:57 AM, Andreas Schneider wrote:*>>* On Thursday 07 October 2010 16:45:49 Andreas Schneider wrote:*>>>* My current problem is with javah (C header file generator). This*>>>* generator*>>>* works on the class files. The class files aren't in*>>>* CMAKE_CURRENT_BINARY_DIR they are located in:*>>>**>>>* ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/<project>.dir/<some>/<directory>/foo*>>>**>>>* bar.class*>>>**>>>* So my current problem is how to point the generator there ...*>>* In the language information file, this is<OBJECT_DIR> so is there*>>* something*>>* like CMAKE_CURRENT_OBJECT_DIR?*>>**>>**>>* -- andreas*>**>* I made a CMake-based build for the VRPN Java bindings, which require a*>* javah call. I have no experience actually using them, so I'm not sure if*>* they work, but they certainly compile. (Of course, I didn't realize*>* there was CMake Java support, so this is all add_custom_command/target*>* driven) Perhaps it will help:*>**>* http://github.com/rpavlik/vrpn/blob/cmake-java/java_vrpn/CMakeLists.txt*>**>* Hope this helps!*>**>* Ryan*>**The java support was broken a while ago when we re-organized the build
> trees.   I don't have much time to work on this, but I would like to get
> it fixed.  The best approach might be a pure custom command approach.
> We could model it after the scons java support which is quite simple.  I
> am thinking of adding a module for java building into the Modules
> directory as java does not really fit our language type that well.
>
> Anyone want to help?
>
> -Bill
>
>
I would be interested in improving Java support in CMake.  A source code
parser which finds out names of generated output object files, as in the
SCons Java support, is a must.  That's what the current Java support in
CMake lacks the most.  I've searched through CMake source code and it looks
like the object file name is always obtained just from the source file
name.  Unfortunately this doesn't work for Java.  Would you please give me
some more details on how do you see the module implemented?  Or some hints
from where to start?  The most tricky part is how to handle changing
dependencies.  Should the classes and jar be separate targets, as it is in
SCons?

--
Best regards,
Michał Czuczman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101014/8c2c7301/attachment.htm>


More information about the CMake mailing list