Fwd: Reminder: use KF5::foo instead of ${foo_LIBRARIES} in CMakeLists
Aurélien Gâteau
agateau at kde.org
Thu Sep 26 12:22:06 UTC 2013
On Wednesday 25 September 2013 19:13:00 Alexander Neundorf wrote:
> On Wednesday 25 September 2013, Aurélien Gâteau wrote:
> ...
>
> > Unfortunately, ALIAS is a new feature of the add_library command, which is
> > only available in cmake git for now and will be in 2.8.12. Therefore we
> > cannot use this solution right now. This means we can't have standalone
> > builds of tier2 and tier3 frameworks. tier1 frameworks are OK since by
> > definition they do not depend on other frameworks.
> >
> > The alternative syntax: ${KConfigCore_LIBRARIES} would work in both cases,
> > but it is more error prone: any typo in the variable name causes the
> > variable to be expanded to an empty string, making it more difficult to
> > debug, whereas using target names provide more explicit error messages.
>
> I said it before, this "alternative syntax" has the advantage that it has
> been working in cmake forever, and all developers using cmake know this
> syntax.
Agreed. I personally believe we should ensure frameworks in tierX are really
building standalone as soon as possible. After all, this is the whole point of
splitting kdelibs. As such I was personally in favor of using variables for
now, and do a massive fix once we can depend on cmake 2.8.12, but Kevin and
David prefer waiting for 2.8.12 to be available. I respect their decision.
> Calling being able to make typos in variable names a disadvantage
> seems weird to me. This applies to all variables you'll ever use in cmake,
> everywhere.
True, and it is one of my most hated CMake "feature".
Aurélien
More information about the Kde-frameworks-devel
mailing list