FindPlasma.cmake obsolete ?

Alexander Neundorf neundorf at kde.org
Mon Jan 5 19:45:25 CET 2009


Hi,

On Sunday 04 January 2009, Modestas Vainius wrote:
> Hello,
>
> sekmadienis 04 Sausis 2009, Alexander Neundorf rašė:
> > That it doesn't work now doesn't mean it never will.
> > At least it won't for 4.2.
> > We can try to support somewhat modular builds better for 4.3
> > FindPlasma.cmake in its current state doesn't help with this.
>
> Actually it does. Now you plan to *force* developers to remove
> find_package(Plasma) from their CMakeLists.txt. 

It was used in 6 places in trunk/KDE/, but only in one of those places 
actually anything coming from that file was used (PLASMA_LIBS in 
kdeedu/marble). In on other place (kdebase somewhere) a variable from this 
file was used but the file wasn't executed, so it was always empty.
So there was no use of it in trunk/KDE/.

> So later are you going to
> tell them to readd it? That is strange at least. I suggest you strip down
> FindPlasma.cmake to the bare minimum, like:
>
> if(NOT KDE4_FOUND)
> 	find_package(KDE4 REQUIRED)
> end(NOT KDE4_FOUND)
>
> find_file(KDE4_PLASMA_FOUND plasma/plasma.h ${KDE_INCLUDE_DIR}
> NO_DEFAULT_PATH)
>
> if (KDE4_PLASMA_FOUND)
> 	set(KDE4_PLASMA_LIBRARY ${KDE4_TARGET_PREFIX}plasma)
> 	set(KDE4_PLASMA_LIBS ${KDE4_TARGET_PREFIX}plasma)
>
> 	find_file(KDE4_PLASMA_OPENGL_FOUND plasma/glapplet.h ${KDE_INCLUDE_DIR}
> NO_DEFAULT_PATH)
> else (KDE4_PLASMA_FOUND)
> 	if (Plasma_FIND_REQUIRED)
> 		message(FATAL "Plasma libraries was not found on the system")
> 	endif(Plasma_FIND_REQUIRED)
> endif (KDE4_PLASMA_FOUND)
>
>
> <code completely untested>

Sorry, too late for this now.
If we add this (completely untested) code now one day before RC1, we have to 
keep compatibility for it for all of KDE 4.x.
And I still didn't have time to think about how to support modular builds of 
KDE modules in a good way (there shouldn't be bigger problems for modular 
builds of apps, but for libs).

Let's find a good way how to support modular builds of the KDE modules for KDE 
4.3.

...
> If you really plan to work on making build more modular, do not lose these
> small bits which are already there (even they were not intentional).

No, keeping it now might make supporting it in a good way maybe actually 
harder. Since the way we'll come up with would have to be compatible with 
what we would add now to svn.

If you really want, you can ship/distribute a FindPlasma.cmake also 
independently from kdelibs, so projects may include private copies of it in 
their sources.

Alex


More information about the Kde-buildsystem mailing list