<br><br><div class="gmail_quote">On Fri, Dec 18, 2009 at 11:11 AM, Marcel Loose <span dir="ltr"><<a href="mailto:loose@astron.nl">loose@astron.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Adolfo,<br>
<br>
I cannot reproduce the problem you mention. I made the following<br>
CMakeLists.txt file:<br></blockquote><div><br>Hmm, I'll perform a check on my side. I noticed the issue quite some time ago so I might have missed some details in my previous email. Anyway, thanks for your test. Your output is definitely the expected behavior I want. I'll report back as soon as I have something.<br>
<br>Adolfo.<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
cmake_minimum_required(VERSION 2.6)<br>
project(MyBoost)<br>
<br>
find_package(Boost REQUIRED COMPONENTS date_time)<br>
message(STATUS "Boost_FOUND=${Boost_FOUND}")<br>
message(STATUS "Boost_LIBRARIES=${Boost_LIBRARIES}")<br>
<br>
find_package(Boost REQUIRED COMPONENTS regex)<br>
message(STATUS "Boost_FOUND=${Boost_FOUND}")<br>
message(STATUS "Boost_LIBRARIES=${Boost_LIBRARIES}")<br>
<br>
Running cmake (2.6.2) produces:<br>
-- The C compiler identification is GNU<br>
-- The CXX compiler identification is GNU<br>
-- Check for working C compiler: /usr/bin/gcc<br>
-- Check for working C compiler: /usr/bin/gcc -- works<br>
-- Detecting C compiler ABI info<br>
-- Detecting C compiler ABI info - done<br>
-- Check for working CXX compiler: /usr/bin/c++<br>
-- Check for working CXX compiler: /usr/bin/c++ -- works<br>
-- Detecting CXX compiler ABI info<br>
-- Detecting CXX compiler ABI info - done<br>
-- Boost version: 1.36.0<br>
-- Found the following Boost libraries:<br>
-- date_time<br>
-- Boost_FOUND=TRUE<br>
-- Boost_LIBRARIES=/usr/lib64/libboost_date_time-mt.so<br>
-- Boost version: 1.36.0<br>
-- Found the following Boost libraries:<br>
-- regex<br>
-- Boost_FOUND=TRUE<br>
--<br>
Boost_LIBRARIES=/usr/lib64/libboost_date_time-mt.so;/usr/lib64/libboost_regex-mt.so<br>
-- Configuring done<br>
-- Generating done<br>
<br>
So, in my case boost_regex is nicely added to boost_date_time.<br>
<br>
Best regards,<br>
Marcel Loose.<br>
<br>
<br>
On Fri, 2009-12-18 at 10:48 +0100, Adolfo Rodríguez Tsouroukdissian<br>
wrote:<br>
<div><div></div><div class="h5">><br>
><br>
> On Fri, Dec 18, 2009 at 10:19 AM, Marcel Loose <<a href="mailto:loose@astron.nl">loose@astron.nl</a>><br>
> wrote:<br>
> Hi Roman,<br>
><br>
> Not in a portable way. I'm not too familiar with Windows, but<br>
> on Linux<br>
> you can do this when libA is a shared library that has its<br>
> dependency on<br>
> libB linked in (e.g. ldd libA.so will tell you this). When<br>
> linking in<br>
> static libraries you're out of luck.<br>
><br>
> I would write a FindA.cmake file for this and let that macro<br>
> set the<br>
> variable A_LIBRARIES to contain both libA and libB. You can<br>
> then use:<br>
><br>
> find_package(A)<br>
> target_link_libraries(${A_LIBRARIES})<br>
><br>
> I've had to deal with this issue and Marcel's proposal is what I do.<br>
> There is one slight gotcha that I haven't resolved cleanly yet.<br>
> Suppose that A_LIBRARIES depends on certain Boost components, so<br>
> inside FindA.cmake I perform a<br>
><br>
> find_package(Boost REQUIRED COMPONENTS xxx yyy)<br>
><br>
> and append Boost_LIBRARIES to A_LIBRARIES. Note: I use find_package<br>
> instead of hardcoding the library names so that libraries appear as<br>
> fully qualified paths, and nonstandard installation paths can be used.<br>
> Everything OK for now.<br>
><br>
> Now, in my project, which depends on A and some other Boost component<br>
> I do<br>
><br>
> find_package(A)<br>
> find_package(Boost REQUIRED COMPONENTS zzz)<br>
><br>
> What happens is that since Boost was already found in A, the zzz<br>
> component is not included in Boost_LIBRARIES. Has anybody found a<br>
> successful way of dealing with this?<br>
><br>
> TIA,<br>
><br>
> Adolfo<br>
><br>
><br>
><br>
><br>
> Hope this helps,<br>
> Marcel Loose.<br>
><br>
><br>
><br>
> On Thu, 2009-12-17 at 12:18 -0500, Roman Shtylman wrote:<br>
> > Is there an easy way to setup link dependencies between<br>
> libraries not<br>
> > build using cmake?<br>
> ><br>
> > Lets say I have a system library A which depends on system<br>
> library B.<br>
> > I then make an executable that uses code from A. I need to<br>
> link<br>
> > against A and B, but as a user of just library A, I don't<br>
> want to<br>
> > worry about that. Does cmake have a facility to define such<br>
> a<br>
> > hierarchy/dependency chain so that I can just do<br>
> ><br>
> > target_link_libraries(<target> A)<br>
> ><br>
> > and have it figure out that it needs to link against B as<br>
> well?<br>
> ><br>
> > Note that neither A nor B are built using cmake, they<br>
> already exist.<br>
> ><br>
> > ~Roman<br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Adolfo Rodríguez Tsouroukdissian, Ph. D.<br>
><br>
> Robotics engineer<br>
> PAL ROBOTICS S.L<br>
> <a href="http://www.pal-robotics.com" target="_blank">http://www.pal-robotics.com</a><br>
> Tel. +34.93.414.53.47<br>
> Fax.+34.93.209.11.09<br>
> AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos,<br>
> pueden contener información privilegiada y/o confidencial que está<br>
> dirigida exclusivamente a su destinatario. Si usted recibe este<br>
> mensaje y no es el destinatario indicado, o el empleado encargado de<br>
> su entrega a dicha persona, por favor, notifíquelo inmediatamente y<br>
> remita el mensaje original a la dirección de correo electrónico<br>
> indicada. Cualquier copia, uso o distribución no autorizados de esta<br>
> comunicación queda estrictamente prohibida.<br>
><br>
> CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s)<br>
> may contain confidential information which is privileged and intended<br>
> only for the individual or entity to whom they are addressed. If you<br>
> are not the intended recipient, you are hereby notified that any<br>
> disclosure, copying, distribution or use of this e-mail and/or<br>
> accompanying document(s) is strictly prohibited. If you have received<br>
> this e-mail in error, please immediately notify the sender at the<br>
> above e-mail address.<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Adolfo Rodríguez Tsouroukdissian, Ph. D.<br><br>Robotics engineer<br>PAL ROBOTICS S.L<br><a href="http://www.pal-robotics.com">http://www.pal-robotics.com</a><br>
Tel. +34.93.414.53.47<br>Fax.+34.93.209.11.09<br>AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden contener información privilegiada y/o confidencial que está dirigida exclusivamente a su destinatario. Si usted recibe este mensaje y no es el destinatario indicado, o el empleado encargado de su entrega a dicha persona, por favor, notifíquelo inmediatamente y remita el mensaje original a la dirección de correo electrónico indicada. Cualquier copia, uso o distribución no autorizados de esta comunicación queda estrictamente prohibida.<br>
<br>CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may contain confidential information which is privileged and intended only for the individual or entity to whom they are addressed. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of this e-mail and/or accompanying document(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender at the above e-mail address.<br>