RFC: pkg-config for KDE

Ian Reinhart Geiser geiseri at yahoo.com
Wed Sep 29 18:27:49 BST 2004


Greetings,
I have been working with QMake to build KDE applications lately.  One tool
that has simplified development with QMake is pkg-config.  It also can
simplify autotools project files too since it will do most of the dirty
work in figuring out where stuff is installed and what it needs to link.

As a service to people who wish to develop 3rd party KDE applications but
do not want to associate themselves with the emotional baggage of our
build system I am proposing adding pkg-config support into KDE.

I have already done kdeui, kdelibs and kdefx as an experiment.  So far the
results are extremely favorable. There are a few issues that have to be
worked out to get as much as possible autogenerated, but at this point I
am very optimistic that this wouldn't be more than a weekend task.

The largest advantage of pkg-conf that I see at this time is it will
significantly reduce the overhead of 3rd party developers who wish to
build KDE applications.
Example:
  g++ someapp.cpp `pkg-config --cflags --libs kdeui`
vs
  g++ someapp.cpp -I/some/hardcoded/path -L/some/other/hardcoded/path
-libkdeui -lkdecore

pkg-config will figure out dependencies and include paths of required
supporting libraries.  since Qt already ships with a pkg-config file, this
too can be included. Also there are quite a few applications already
jumping on the pkg-config bandwagon, so I really see KDE following suit as
a gain for adoption of the tool.

The additions to the build system are quite trivial.  I have attached a
patch for kdecore,kdeui, and kspell to show how useful this is.

So what do people think about this approach?  Are people willing to help
populate .pc.in files for their respective libraries?  Are people against
having such things in KDE cvs?

Cheers
   -ian reinhart geiser
--
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kdecore.pc.in
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040929/5b71bbec/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kspell.pc.in
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040929/5b71bbec/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: kdeui.pc.in
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040929/5b71bbec/attachment-0002.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pkg-config.patch
Type: text/x-diff
Size: 1720 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040929/5b71bbec/attachment.patch>


More information about the kde-core-devel mailing list