On Friday 15 October 2010 23:13:41 Michał Czuczman wrote: > I use CMake for building a multi-platform multi-language project where > for most parts it fits very well. However, one part of the project is > written in Java, with some native implementations. So it would be great > to have a nice Java support in CMake. Using another build system just > for that part adds one to many build-time dependency. > > The pitfalls I've encountered in CMake Java support were: > > * All objects are always rebuilt. > * The generated JAR file is polluted with build system CMake files. > > This is why I would like to contribute to the great CMake project and > have a nice simple Java support.
Hi, this is my current implementation of Java support. It allows you to compile java files and add resources to it. http://git.cynapses.org/users/asn/pki.git/tree/cmake/Modules/UseJava.cmake?h=cmake set(java_SRCS wurst.java brot.java wurstbrot.properties ) set(CMAKE_JAVA_INCLUDE_PATH gurke.jar) add_jar(wurstbrot ${java_SRCS}) Cheers, -- andreas _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake