[Cmake] some starting help wanted :-)
Brad King
brad.king at kitware.com
Wed, 28 Apr 2004 09:09:09 -0400
Alexander Neundorf wrote:
> Hi,
>
> until now I used only some basic functions of cmake, now I want to do
> something more with it, i.e. try to add better support for Qt and KDE.
>
> 1) There is a FindQt file, which searches for libqt. Now I'd like to
> improve it this way that I can specify which version of Qt I need at least
> and whether I need the multithreaded version of Qt or not.
You could modify the file to look for a QT_REQUIRED_VERSION variable and
use its contents to check for a particular version.
> 2) With FIND_LIBRARY I was able to find a kde lib, e.g. libkdecore and its
> path.
> Now kde consists of a lot more libraries and I don't want to FIND_LIBRARY
> for each one of them, because this would give me a bunch of directory
> variables all with the same value (all kde libs should be in the same
> dir).
> Maybe I should simply check for one kde lib (libkdecore) and use this path
> for all other libs too.
You could use a FIND_PROGRAM command to locate kde-config and then use
EXEC_PROGRAM to run kde-config --prefix. The resulting path can then be
used to specify the libraries with a fixed path. This could also be
used to check the version.
> 3) Additionally to the Qt moc preprocessor kde features a bunch of other
> code generators (e.g. for dcop and other stuff), which have to be run
> before the actual compiling. Where do I start to look how to implement
> this ?
Take a look at the implementation of the ADD_CUSTOM_COMMAND command in
Source/cmAddCustomCommandCommand.cxx.
-Brad