On 2015-09-24, Harald Sitter <sit...@kde.org> wrote: > Uh, ah, but, CMake is too smart :P > If you add a target_link_library that isn't actually used it won't be > linked. So what every application would have to do is add the target
It is not cmake that is too smart, but the linker when passed --as-needed (which many distributions does) $ cat foo.cpp int main(int, char**) { }; $ g++ -lQt5Core foo.cpp $ objdump -x a.out | grep Qt5Core NEEDED libQt5Core.so.5 $ g++ -Wl,--as-needed -lQt5Core foo.cpp $ objdump -x a.out | grep Qt5Core But bottom line, just adding some extra linkage doesn't get kept for many compiled versions. /Sune _______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel