<div dir="ltr"><a href="http://www.cmake.org/cmake/help/v3.0/command/add_custom_target.html">http://www.cmake.org/cmake/help/v3.0/command/add_custom_target.html</a><br><div><br></div><div>looks like all existing projects just do it by hand... it's safer if the build script doesn't have it.  (much like not making copying runtime libraries easy)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 15, 2014 at 12:49 AM, Petr Bena <span dir="ltr"><<a href="mailto:benapetr@gmail.com" target="_blank">benapetr@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, one more question<br>
<br>
How do I enforce run of ldconfig during `sudo make install` on linux?<br>
The library doesn't load without it.<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Dec 15, 2014 at 9:37 AM, J Decker <<a href="mailto:d3ck0r@gmail.com">d3ck0r@gmail.com</a>> wrote:<br>
> target_link_libraries( B A_product_name)<br>
> target_link_libraries( C A_product_name)<br>
><br>
><br>
> On Mon, Dec 15, 2014 at 12:34 AM, Petr Bena <<a href="mailto:benapetr@gmail.com">benapetr@gmail.com</a>> wrote:<br>
>><br>
>> I have a project:<br>
>><br>
>> /Target A<br>
>> - CMakeLists.txt<br>
>> - /Target B<br>
>> -- CMakeLists.txt<br>
>> - /Target C<br>
>> -- CMakeLists.txt<br>
>><br>
>> So, A is including B and C using add_subdirectory. However, A is<br>
>> producing 2 targets, one of which is a library and I need to link B<br>
>> and C against that library. How would I do that?<br>
>> --<br>
>><br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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>
>> Kitware offers various services to support the CMake community. For more<br>
>> information on each offering, please visit:<br>
>><br>
>> CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
>> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
>> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</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>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div></div>