Andreas, The proposed command at the end of add_jar will give me a classpath variable with all the required jars and with the target jar: set(${_TARGET_NAME}_CLASSPATH ".${CMAKE_JAVA_INCLUDE_PATH_FINAL}/${_TARGET_NAME}.jar" PARENT_SCOPE)
NOTE the use of CMAKE_JAVA_INCLUDE_PATH_FINAL and not CMAKE_JAVA_CLASS_OUTPUT_PATH. For the resurce files, since the add_jar already copies the files I just added a prefix parameter for resource files. A bit brute force but effective. Allen > On Saturday 05 February 2011 16:04:15 Allen D Byrne wrote: > > Yes! That is where I meant! (dang email doesn't read minds properly:) > > there is already ${_TARGET_NAME}_JAR_FILE which is exactly what you want. > > > 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 > > I think then you have to move the images to the right location. Resource > files > are just copied to the same location as in the source dir. They are not > magically moved. > > > -- 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