The FindKDE4.cmake script shipped with cmake fails to detect an existing KDE4 installation if the program being built is not going to be installed in the same directory as KDE4. This happens because the script in question misinterprets the KDEDIRS environment variable, supposing that it contains the directory of the KDE4 binaries, which it turns to not be the case. This bug is already fixed in the CMake SVN - See revision 1.10 http://www.cmake.org/cgi-bin/viewcvs.cgi/Modules/FindKDE4.cmake?rev=1.10&root=CMake&r1=1.10&view=log
Created attachment 130102 [details, diff] Diff to revision 1.10
Thanks, Zephyrus! I've just checked the fix in.