2009/3/20 Robert Haines <rhai...@manchester.ac.uk> > I am creating a library through add_library command of java files. >> Now i want to link it with some jar files which contain some classes which >> is needed to build that library. >> >> target_link_libraries is not working in this case. >> > > As far as I can tell you need to set classpath via include_directories: > > include_directories(/path/to/classes /path/to/jars/jar.jar) > > See also this bug (including the attached file) for more details: > http://public.kitware.com/Bug/view.php?id=7832 > > Java support is pretty weak in CMake at present. It can be forced to > behave, just, but it's not pleasant. Otherwise, CMake is a great tool! > > Cheers, > Rob > > As you have said i included the jars by include_directories command but it is still not working because it does not find classes from which these jars have build.
if i extract the classes from jar and include that folder path then it works. But my question is why it is not directly taking it when i give it the path to jars why i need to extract the files from the jars abnd give its path.. if i extract the classes then what is the need to give path to that jar... ankit
_______________________________________________ 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