[CMake] CMake Java Support

Allen D Byrne byrn at hdfgroup.org
Sat Feb 5 10:04:15 EST 2011


Yes! That is where I meant! (dang email doesn't read minds properly:)

BTW, I have a problem I couldn't fix. When doing an add_jar with source in the current dir and resource files (image files) in a sub-directory, the resource files in the jar are at the class base instead of below. 
Example;

Want:
x.jar
---- classpath1
---------classpath2
------------classA
------------images
----------------Z.img

Get:
x.jar
---- classpath1
---------classpath2
------------classA
----images
-------Z.img
 

Any ideas?

Allen

> On Wednesday, January 12, 2011 15:32:08 you wrote:
> > Andreas,
> > Thanks for providing these files! I have finally been able to progress on
> > converting our java product to cmake. I have one suggestion:
> > 
> > Add to the add_java function the classpath for the target;
> > 
> >     set(${_TARGET_NAME}_CLASSPATH
> > ".${CMAKE_JAVA_INCLUDE_PATH_FINAL}/${_TARGET_NAME}.jar" PARENT_SCOPE)
> 
> Wouldn't be
> 
> set(${_TARGET_NAME}_CLASSPATH 
> "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/${_TARGET_NAME}.jar" PARENT_SCOPE)
> 
> more correct on the end of the add_jar function?
> 
> 	-- andreas
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110205/ff535bf1/attachment.htm>


More information about the CMake mailing list