[Kde-bindings] Re: Conditionally include headers based on KDE version

Ian Monroe ian at monroe.nu
Sat Dec 4 23:35:49 UTC 2010

On Sat, Dec 4, 2010 at 5:31 PM, Chris Burel <chrisburel at gmail.com> wrote:
> Hey guys,
> I'm having to build the Perl bindings against an older version of
> Qt/KDE, specifically 4.4.3/4.1.3.  However, a lot of the kde smoke
> modules don't build, because they include headers that didn't exist
> when 4.1.3 was released.  So I've gone through and modified the
> various module_includes.h files to conditionally include these files
> based on the version of KDE being used.  So, something like
> kdecore_includes.h would have this:
> #if KDE_VERSION >= 0x040200
> #include <sonnet/globals.h>
> #endif
> #if KDE_VERSION >= 0x040202
> #include <kencodingprober.h>
> #endif
> #if KDE_VERSION >= 0x040400
> #include <kauthaction.h>
> #include <kauthactionreply.h>
> #include <kauthactionwatcher.h>
> #include <kauthhelpersupport.h>
> #include <kauth.h>
> #include <kcurrencycode.h>
> #endif
> One thing I did have to mess with a lot was plasma.  Apparently in 4.1
> Plasma wasn't part of kdelibs, so there's a small modification to the
> top-level CMakeLists.txt file to have a "find_package(Plasma)" if the
> kde version is less than 4.2.0.
> Does anyone have any problems with me committing these changes?

Sounds fine, but if you want a review, attach a patch. :)


More information about the Kde-bindings mailing list