<br><br>
<div class="gmail_quote">2009/3/20 Robert Haines <span dir="ltr"><<a href="mailto:rhaines@manchester.ac.uk">rhaines@manchester.ac.uk</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I am creating a library through add_library command of java files.<br>Now i want to link it with some jar files which contain some classes which is needed to build that library.<br>
<br>target_link_libraries is not working in this case.<br></blockquote><br></div>As far as I can tell you need to set classpath via include_directories:<br><br>include_directories(/path/to/classes /path/to/jars/jar.jar)<br>
<br>See also this bug (including the attached file) for more details: <a href="http://public.kitware.com/Bug/view.php?id=7832" target="_blank">http://public.kitware.com/Bug/view.php?id=7832</a><br><br>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!<br>
<br>Cheers,<br>Rob<br><br></blockquote></div>
<div><br>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.</div>
<div> </div>
<div>if i extract the classes from jar and include that folder path then it works.</div>
<div> </div>
<div>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...</div>
<div> </div>
<div>ankit</div>