On 03/27/2013 08:54 AM, Stephen Kelly wrote: > Brad King <brad.king@...> writes: >> the iface->SharedDeps list needs to be included in >> IMPORTED_LINK_INTERFACE_TARGETS_≤CONFIG> also. > > The problem with this is that it will break working code. Not-found entries in > the LINK_DEPENDENT_LIBRARIES do not currently cause a build error. The only > effect (as far as I know) is that the target location is not available for > generating the correct RPATH information, which downstreams may or may not > use.
It's not for -rpath, it's for -rpath-link. They are different. See the example here for how it can cause a build error in downstreams: http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/35578/focus=35666 > I also find it unfortunate that the internal implementation detail > dependencies > of a package would need to be found by the package. Eg, if I have > > IMPORTED_LINK_DEPENDENT_LIBRARIES_RELWITHDEBINFO "Qt5::Script" > IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "Qt5::Core" > > in MyTarget, then MyTargetConfig.cmake will have to find_package(Qt5Script), > even though callers only need that to be found if they want the RPATH > information from it. Is there a better solution? Fix linkers to not need implementation dependencies of a shared library when linking to it? I presume there is a reason linkers need this. CMake is merely propagating this linking requirement, not adding it. The feature proposed in this discussion is about erroring-out at CMake time instead of link time. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
