You will need the full KDE development pattern to be installed. Furthermore, even if it compiles AFAIK it won’t work this way since the kde4 prefix is missing.
In the downloaded source dir it should go like this
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=kde4-config --prefix …
make
make install
But first make sure you have the development pattern installed.
I already had the following relevant patterns installed:
Base Development
KDE Development
C/C++ Development
Qt 4 Development
I’m worried that I need a newer version of kdepimlib, for which I would need a newer version of kdelib, for which I may well need to download the entirety of KDE just to compile kmail.
I may try to checkout an older version of kdepim (rather than trunk) that matches my devel version.