[Cmake] Building Java projects using CMake

Andy Cedilnik andy.cedilnik at kitware.com
Wed Dec 11 12:37:09 EST 2002


Hi All,

I added initial Java support in CMake CVS. The CMakeLists.txt file for a
simple Java project looks like this:

PROJECT(Applet JAVA)

SET(CMAKE_JAVA_COMPILE_FLAGS -target 1.1 -deprecation)

SET(Applet_srcs 
   Applet.java
   Foo.java
   Bar/FooBar.java
   )

SET(CMAKE_JAVA_INCLUDE_PATH ${Applet_SOURCE_DIR}/Bar)

ADD_JAVA_LIBRARY(Applet ${Applet_srcs})

That is it. 

This will work only in the CVS version of CMake and I guess in CMake 1.6
on.

I would appreciate if people would test it and tell me what you think.

Thank you.

				Andy




More information about the CMake mailing list