If you export you targets using install(EXPORT ...)
then the foo static library should contain a dependency to bar in its INTERFACE_LINK libraries. If bar is an imported target your config file should use find_dependency so that the bar imported target is resolved by consuming CMake based packages. If bar is just the path to the binary than the absolute path will be recorded in your export files and your foo package will become non relocatable. As far as I know the PRIVATE keyword should have no effect on transitive linking when foo is static and we call: target_link_libraries(foo PRIVATE bar) Hope this helps. On Mon, Aug 15, 2016 at 9:32 PM, Ivan Shapovalov <inte...@intelfx.name> wrote: > ks to a library `bar`, which is an implementation detail, i. e. > clients of `foo` do not need to know that I use `bar`. Hence I make it > a PRIVATE dependency (let's assume that authors of Bar also try to do > modern CMake and pac > -- Guillaume Dumont ========================= dumont.guilla...@gmail.com
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake