Appendix A. KDE modules and source code organization

The Module

KDE groups its software into modules of various size. This was initially a loose grouping of a few large modules, but with the introduction of the Git-based source code repositories, these large modules were further split into many smaller modules.

kdesrc-build uses this module concept as well. In essence, a module is a grouping of code that can be downloaded, built, tested, and installed.

Individual modules

It is easy to set kdesrc-build to build a single module. The following listing is an example of what a declaration for a Subversion-based module would look like in the configuration file.

module kdefoo
    cmake-options -DCMAKE_BUILD_TYPE=Debug
end module

Tip

This is a Subversion-based module since it doesn't use a repository option. Also, the cmake-options option is listed as an example only, it is not required.

Groups of related modules

Now most KDE source modules are Git-based KDE, and are normally combined into groups of modules.

kdesrc-build therefore supports groups of modules as well, using module sets. An example:

module-set base-modules
    repository kde-projects
    use-modules kde-runtime kde-workspace kde-baseapps
end module-set

Tip

You can leave the module set name (base-modules in this case) empty if you like. This repository setting tells kdesrc-build where to download the source from, but you can also use a git:// URL.

One special feature of the repository kde-projects is that kdesrc-build will automatically include any Git modules that are grouped under the modules you list (in the KDE Project database).