macro_optional_find_package(Whatever) without FindWhatever.cmake
Alexander Neundorf
neundorf at kde.org
Wed Sep 3 23:54:19 CEST 2008
On Wednesday 03 September 2008, Jan Kundrát wrote:
> Hi guys,
> I'd like to add an optional support for Marble to KPhotoALbum. My
> approach was the classic one:
>
> macro_optional_find_package(Marble)
>
> However, as I'd like to make the support really optional, I want it to
> work even on systems without the FindMarble.cmake file (another KPA
> developer sitting next to me has such system).
>
> How should I solve this issue? I'd like to avoid bundling the
> FindMarble.cmake with my application, as it'd just cause troubles
> because I certainly won't keep it synced with the official one etc.
Hmm, FindMarble.cmake is in kdeedu/marble/, and only installed once marble is
installed. This is only mildly usefull (since, as you noted, it only works if
marble is actually there).
I think there are only two options:
1) move FindMarble.cmake to kdelibs/cmake/modules/
2) ship a copy of it with your application
For now I'd suggest 2), you can do this right now. Once we install
FindMarble.cmake from kdelibs, it has to stay compatible for all of KDE4,
which is some work.
I guess we should do it similar to automoc4 also with marble, there we install
a Automoc4Config.cmake file which has all the detailled information, and
FindAutomoc4.cmake can stay _very_ basic and only needs to find this file.
Alex
More information about the Kde-buildsystem
mailing list