Menu

#134 CMAKE build system should support building without KDE

open
nobody
None
5
2012-09-23
2010-02-23
Sparky
No

It would be nice if the CMAKE build system supported optionally building against KDE.

I wrote a patch that does this:
- refractors the 2 main cmake files
- cleanup some other build files
- cleanup/fix some includes
- removes precompiled headers (ugly to get working in cmake, and no guarantees on portability)
- minor changes to the desktop file

By default this will attempt to find KDE and LibKonq, but that can be disabled with -DWITH_KDE4=OFF and -DWITH_LibKonq=OFF

One thing this patch doesn't touch is the build/install documentation... but I don't have a problem making those changes if desired.

I have tested this on my Gentoo Linux system. What works (for me):
- building with qmake
- building with cmake - without KDE
- building with cmake - with KDE without LibKonq
- building with cmake - with KDE with LibKonq

I have not tested any of these changes on Windows, as I don't have a system available/setup to do that. But any necessary changes should be limited to the KDE4Replacement cmake include.

Comments/Suggestions/Critiques are welcome and I'd be happy to make subsequent revisions to the patch.

Discussion

  • Sparky

    Sparky - 2010-02-23

    CMAKE optional KDE patch

     
  • Joachim Eibl

    Joachim Eibl - 2010-02-24

    Hi Sparky,
    Thanks for this very impressive patch. Although I intend to preserve the qmake build technique and my small configure script I think this will help in some cases.
    By the way: Do you know how to run cmake so that an executable with debug-information but without optimization is created? I have never found out what parameter is needed to build with "-g -O0". The option "-DCMAKE_BUILD_TYPE=debugfull" always results in "-g -O2" but this is awful for debugging.
    Cheers,
    Joachim

     
  • Sparky

    Sparky - 2010-02-25

    Sorry, I'm not sure how debugging works in cmake. That would probably be a question for KitWare's cmake forums/lists.

     
  • Sparky

    Sparky - 2010-02-25

    Updated patch. Without the chunks that remove the configure script and precompiled header support in the qmake file