On Saturday 26 November 2011, Stephen Kelly wrote:
> >
> > target_link_libraries(foo
> >
> > LINK_PUBLIC
> > ${QT_QTCORE_LIBRARIES}
> > LINK_PRIVATE
> > ${QT_QTSCRIPT_LIBRARIES}
> >
> > )
>
> Only this or
>
> target_link_libraries(foo
> LINK_PRIVATE
> ${QT_QTSCRIPT_LIBRARIES}
> LINK_PUBLIC
> ${QT_QTCORE_LIBRARIES}
> )
>
> would work. I don't remember why. It might make sense to allow
> specifying only one of them, so that the below would be equivalent
> to the above.
>
> target_link_libraries(foo
> ${QT_QTSCRIPT_LIBRARIES}
> LINK_PUBLIC
> ${QT_QTCORE_LIBRARIES}
> )
>
> target_link_libraries(foo
> ${QT_QTCORE_LIBRARIES}
> LINK_PRIVATE
> ${QT_QTSCRIPT_LIBRARIES}
> )
>
> But I guess the cmake devs would have to agree to it.If anything then target_link_libraries() should have one well-defined default and everything else should have to be specified explicitly. Everything else is just confusing and error-prone. In C++ it was done right for classes (and structs): A well-defined default combined with an easy to understand way to change it explicitly. Regards, Ingo
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
