Mac OS X Frameworks Frameworks
Aleix Pol
aleixpol at kde.org
Mon Feb 24 01:49:45 UTC 2014
On Sun, Feb 23, 2014 at 8:15 PM, Harald Fernengel <harryf at gmx.com> wrote:
> Hi,
>
> TL;DR
>
> Do we want to do build KDE Frameworks as Mac OS X Frameworks?
>
> Long Story:
>
> on Mac OS X, libraries are typically deployed as "Frameworks" (e.g. a
> directory containing the shared library, headers, resources and meta
> data). A framework can be simply dragged&dropped to Xcode projects and
> it's also easier from command line:
>
> clang++ -framework KF5Archive -framework QtCore main.cpp
>
> (Assuming that Qt and KF5Archive are in a standard Framework path,
> otherwise, add "-F /path/to/framework").
>
> I tried to create an OS X Framework out of KArchive and ended up with
> attached patch (see also https://git.reviewboard.kde.org/r/115977/)
>
> What needs to happen on KF5 side?
>
> 1) All public headers must be added as source files (e.g. to
> add_library()) and set as PUBLIC_HEADER property on the target. Instead
> of a manual "install" rule, we need to set PUBLIC_HEADER DESTINATION to
> the install TARGETS rule.
>
> 2) Public (installed) headers must use
>
> #include "myOtherHeader" // (double quotes)
>
> to include headers belonging to the same framework
>
> 3) Public headers must use
>
> #include <KF5Whatever/foo.h>
>
> to include headers belonging to other frameworks
>
> Is that worth the hassle? If yes, I can try to convert some of our libs
> to OS X frameworks, hoping not to break things for other platforms ;)
>
> Harald
>
> _______________________________________________
> Kde-frameworks-devel mailing list
> Kde-frameworks-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
>
>
Hi,
I would say that we should follow however it's done in Qt. So far we've
been trying to provide as much of a similar experience as if it was another
Qt module. Doing so here as well could be interesting too.
The changes you propose make sense too, even on a linux system (although
I'm unaware of how this PUBLIC_HEADER property works), so I wouldn't have a
big problem to adopt them.
What scares me the most is that things will break over time from people
only testing on Linux, though. This could become frustrating, but also a
huge step forward for the project.
Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140224/9a09c49a/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list