This is work in progress - right now there seem to be very different views about how runtime dependencies for projects should be handled. This is much more of a problem for Python projects because almost all of their dependencies are runtime only.
Here are some links to discussions:
There is not much that needs to be compiled for a Python project:
from PyQt4 import uic uic.loadUi('mywidget.ui')
So you need a Python interpreter installed for the generation of byte-compiled *.pyc files. Make sure it is a version that can also execute your program. If the version installed at the client side is too different, your precompiled bytecode is incompatible and cannot be used, so the client system will recompile your sources. And if it cannot write them because of missing access rights, it will do that at every program start (there are ways how to tell python where to write its local *.pyc files but that is out of scope for here).
And optionally you need pyuic4 installed. This macro calls pyuic4 and installs the resulting *ui.py files:
PYKDE4_ADD_UI_FILES(src/*.ui)However I believe I had some problems with that macro, that may have been one reason why I now do that at runtime for Kajongg. This would need to be checked.
In C/C++ most runtime dependencies are also build time dependencies - the KDE4 cmake macros do not even let you differentiate them (yet). However Python source code can be bytecompiled without the imported modules being installed - so the set of build time dependencies is very small and about the same for all Python projects.
Since cmake is mostly used by distribution packagers, you should respect their preferences. Developers do not need cmake for Python development at all.
Distribution packagers do NOT want cmake to error out on missing runtime dependencies, they do not even want warnings about them because they just might not want to install them. Packagers want to have their build system as simple (and as fast) as possible with a minimal set of dependencies. Of course they still need to know the runtime dependencies. For now there is no nice way of specifying this with existing cmake macros. Currently the best solution for you is to write runtime dependency information into a file README.packagers in the home of your project.
In theory, the main.py (like kajongg.py in the example below) could directly be installed in whatever */bin directory but it is nicer to only put a symbolic link there like /usr/bin/kajongg -> /usr/share/kde4/apps/kajongg/kajongg.py.
Of course cmake comes with a macro for this: