[CMake] Java Support

Alex Brandt alunduil at alunduil.com
Tue Feb 2 14:56:06 EST 2010


On Friday 22 January 2010 1:37:50 pm David Cole wrote:
> If you are a Java guru, I would appreciate your review and comments on this
> issue, which has been in our issue tracker for a while now. If you have a
> good suggestion for the best way to fix it, I would love to hear it.
> 
> http://public.kitware.com/Bug/view.php?id=7832
> 
> And here's a link to all of the "java related" issues in the tracker (even
> the closed ones, just a simple search on the word "java" in the CMake
> project portion of the issue tracker):
> 
http://public.kitware.com/Bug/search.php?project_id=2&search=java&sticky_is
> 
sues=off&sortby=severity%2Cpriority&dir=DESC%2CDESC&hide_status_id=-2
> 
> 
> Thanks,
> David Cole
> Kitware, Inc.
> 

I've been looking into Java (getting a feel for it's build process and I've 
determined that the CMAKE_Java_LINK_EXECUTABLE should possibly look 
something like this:

IF(NOT ${CMAKE_Java_LINK_EXECUTABLE})
  STRING(REGEX REPLACE "\/" 
    CMAKE_Java_ENTRY_POINT "<TARGET>")
  SET(CMAKE_Java_LINK_EXECUTABLE 
    "<CMAKE_Java_ARCHIVE> -cf <TARGET> -e <CMAKE_Java_ENTRY_POINT> -C 
<OBJECT_DIR>")
ENDIF(NOT ${CMAKE_Java_LINK_EXECUTABLE})

I know I'm using the STRING() macro incorrectly and was wondering if there 
was a good example of its usage.  This should allow us to get the main 
method into the jar's manifest for a pseudo static linked executable.  I'm 
sure there are other problems with this idea but I'm open to suggestions at 
this point.

Regards,

Alex Brandt

-- 
B.S. Physics & Computer Science
Minnesota State University Moorhead
www.alunduil.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100202/494ebff9/attachment.pgp>


More information about the CMake mailing list