CMake and ksysguardd

Pau Garcia i Quiles pgquiles at elpauer.org
Tue Sep 29 17:29:25 BST 2009


On Tue, Sep 29, 2009 at 3:55 PM, John Tapsell <johnflux at gmail.com> wrote:
> Hey all,
>
>  The code in kdebase/workspace/ksysguard/ksysguardd  is self
> contained, with very minimal dependencies (i.e. no Qt etc).

It depends on:
- config-workspace.h, which is generated when kdebase-workspace is configured
- Several KDE macros (MacroBoolTo01, MacroLogFeature, etc)
- The CMakeLists.txt is missing several include's and definitions. It
works now because they are picked up from some parent directory.
- ksysguardd.c, line 414: it uses kde_socklen_t (socklen_t could be used safely)

>  How can I
> make this so that it can be compiled standalone?  In KDE3 you could
> you just go into this directory and compile it, but over time people
> have tweaked the cmake file so that you can no longer do this.
>
>  Could anyone that knows CMake help me with this :)

It is not difficult to make it compile without KDE. The attached patch
fixes and/or ignores the issues I pointed above.

We could use an #ifdef or alike to be able to build ksysguardd with
KDE (using config-workspace, etc) and without KDE (ignoring it). Would
that be interesting for you ?

In addition to that, I think Alex was going to improve KDE's
CMakeLists.txt so that it would be possible to tell CMake "I want to
build only ksysguardd". You would invoke cmake pointing to
kdebase-workspace (or maybe even lower, to kdebase) but it would
ignore everything but ksysguardd. I remember having seen at lest a
proof of concept of this.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksysguard-standalone.patch
Type: text/x-diff
Size: 16348 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090929/004c360c/attachment.patch>


More information about the kde-core-devel mailing list