Hi guys,<div><br></div><div>I like CMake and I&#39;m trying to learn it, however I have problem with my project which I&#39;m not able to solve for couple of days. The problem is, that my project depends on another library which I need to compile and which uses classic toolchain (autoconf + configure). This library automatically compiles other libraries which are also needed. I managed to build these libraries manually and link them to my project just by adding relative path to them to target_link_libraries. It&#39;s get compiled well.</div>

<div><br></div><div>However I also need &quot;make install&quot; to work, or especially &quot;make package&quot; which internally uses install targets. This install however installs only my app, not the libraries needed :(</div>

<div><br></div><div>I tried:</div><div><div>add_library(LIB_CORE SHARED IMPORTED)</div><div>set_property(TARGET LIB_CORE PROPERTY IMPORTED_LOCATION path_to_library.so)</div></div><div>target_link_libraries(MY_PROJECT LIB_CORE)</div>

<div>install(TARGETS ${LIB_CORE} LIBRARY DESTINATION lib)</div><div><br></div><div>which will compile everything well bus just ignore the library when &quot;make install&quot; or  &quot;make package&quot;</div><div><br></div>

<div><br></div><div>I tried it another way:</div><div>install(PROGRAMS ${LIBS_PATH} DESTINATION lib)</div><div><br></div><div>which doesn&#39;t work either, because LIBS_PATH has path to shared libraries which are only symlinks to real files (real files has version in filename). And only this symlinks are copied, without actual library.</div>

<div><br></div><div><br></div><div>What is the right way to include 3rd party libraries into my install/package?</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div>Jan Dolecek<br><a href="http://juzna.cz">juzna.cz</a>@<a href="http://gmail.com">gmail.com</a><br>


</div>