Table of available configuration options

Here is a table of the various options, containing the following information:

  • The option name

  • A description of how kdesrc-build responds if the option is set in both the global section, and the module section of the configuration file while building a module.

  • Special comments on the purpose and usage of the option.

Table 4.1. Table of Options

Option-nameModule -> Global BehaviorNotes

This option was used to allow for building KDE module API documentation. It was removed in kdesrc-build 1.6.3 due to it not being supported in KDE 4. Online API documentation is available from In addition it is possible to build KDE 4's API documentation using the script included in the kde-dev-scripts module. See KDE TechBase for more details.

apply-qt-patches This option was removed in kdesrc-build 1.10. To get the same effect, see the section called “qt support” and the repository option.
asyncCannot be overridden

This option enables the asynchronous mode of operation, where the source code update and the build process will be performed in parallel, instead of waiting for all of the source code updates before starting the build process. This option defaults to enabling asynchronous mode. To disable, set this option to false

This option is available since the 1.6 release.

binpathModule setting overrides global

Set this option to set the environment variable PATH while building. You cannot override this setting in a module option. The default value is the $PATH that is set when the script starts. This environment variable should include the colon-separated paths of your development toolchain. The paths $KDEDIR/bin and $QTDIR/bin are automatically added. You may use the tilde (~) for any paths you add using this option.

branchModule setting overrides global

Set this option to checkout from a branch of KDE instead of the default of master (for Git modules) or trunk (for Subversion), where KDE development occurs.

For instance, to checkout KDE 4.6 branch, you would set this option to 4.6.

If kdesrc-build fails to properly download a branch with this option, you may have to manually specify the URL to download from using the module-base-path or override-url options.


For most KDE modules you probably wish to use the branch-group option instead and use this option for case-by-case exceptions.

branch-groupModule setting overrides global

Set this option to a general group from which you want modules to be chosen.

For supported Git module types, kdesrc-build will determine the actual branch to use automatically based on rules encoded by the KDE developers (these rules may be viewed in the kde-build-metadata source repository in your source directory). After a branch is determined that branch is used as if you had specified it yourself using the branch option.

This is useful if you're just trying to maintain up-to-date on some normal development track without having to pay attention to all the branch name changes.

The current branch groups (as of 2013-08-11) are:

  • stable-qt4, for tracking bugfixes to the Qt™ 4-based KDE libraries and applications.

  • latest-qt4, for tracking development and new features for the Qt™ 4-based KDE libraries and applications.

  • kf5-qt5, for tracking bleeding-edge development for the upcoming Qt™ 5-based KDE Frameworks 5, Plasma Workspace 2, etc.

Note that if you do choose a branch yourself, that it will override this setting. The same is true of other specific branch selection options such as tag.

This option was added in kdesrc-build 1.16-pre2.


This option only applies to kde-projects Git modules (the common case). See also the section called “Automatically finding modules from the official KDE module database”.

build-dirModule setting overrides globalUse this option to change the directory to contain the built sources. There are three different ways to use it:
  1. Relative to the KDE Subversion source directory (see the source-dir option). This is the default, and is selected if you type a directory name that does not start with a tilde (~) or a slash (/).

    The default value is build.

  2. Absolute path. If you specify a path that begins with a /, then that path is used directly. For example, /tmp/kde-obj-dir/.

  3. Relative to your home directory. If you specify a path that begins with a ~, then the path is used relative to your home directory, analogous to the shell's tilde-expansion. For example, ~/builddir would set the build directory to /home/user-name/builddir.

Perhaps surprisingly, this option can be changed per module.
build-when-unchangedModule setting overrides global

Use this option in order to control whether kdesrc-build always tries to build a module that has not had any source code updates.

By setting build-when-unchanged to true, kdesrc-build always attempts the build phase for a module, even if the module did not have any source code updates. This is the default setting since it is more likely to lead to a correct build.

By setting build-when-unchanged to false, kdesrc-build will only attempt to run the build phase for a module if the module has a source code update, or in other situations where it is likely that a rebuild is actually required. This can save time, especially if you run kdesrc-build daily, or more frequently.


This feature is provided as an optimization only. Like many other optimizations, there are trade-offs for the correctness of your installation. For instance, changes to the qt or kdelibs modules may cause a rebuild of other modules to be necessary, even if the source code doesn't change at all.

checkout-onlyModule setting overrides global

Set this option to checkout Subversion sources piece by piece. The value for this option should be a space-separated list of directories to checkout. Although this option overrides the global option, be aware that setting this as a global option makes no sense.

Note that this setting has no effect on Git modules due to the operation of the Git source control system.

See the section called “Checking out portions of a module” for an example.

cmake-optionsAppends to global options for the default buildsystem, overrides global for other buildsystems.

Use this option to specify what flags to pass to CMake when creating the build system for the module. When this is used as a global option, it is applied to all modules that this script builds. When used as a module option, it is added to the end of the global options. This allows you to specify common CMake options in the global section.

This option does not apply to qt (which does not use CMake). Use configure-flags instead.

Since these options are passed directly to the CMake command line, they should be given as they would be typed into CMake. For example:

  cmake-options -DCMAKE_BUILD_TYPE=RelWithDebInfo

Since this is a hassle, kdesrc-build takes pains to ensure that as long as the rest of the options are set correctly, you should be able to leave this option blank. (In other words, required CMake parameters are set for you automatically)

colorful-outputCannot be overriddenSet this option to false to disable the colorful output of kdesrc-build. This option defaults to true. Note that kdesrc-build will not output the color codes to anything but a terminal (such as xterm, Konsole, or the normal Linux® console).
configure-flagsAppends to global options for the default buildsystem, overrides global for other buildsystems.

Use this option to specify what flags to pass to ./configure when creating the build system for the module. When this is used as a global-option, it is applied to all modules that this script builds. This option only works for qt.

To change configuration settings for KDE 4 modules, see cmake-options.

custom-build-commandModule setting overrides global (build system option)

This option can be set to run a different command (other than make, for example) in order to perform the build process. kdesrc-build should in general do the right thing, so you should not need to set this option. However it can be useful to use alternate build systems.

The value of this option is used as the command line to run, modified by the make-options option as normal.

cxxflagsAppends to global options for the default buildsystem, overrides global for other buildsystems.

Use this option to specify what flags to use for building the module. This option is specified here instead of with configure-flags or cmake-options because this option will also set the environment variable CXXFLAGS during the build process.

Note that for KDE 4 and any other modules that use CMake, it is necessary to set the CMAKE_BUILD_TYPE option to none when configuring the module. This can be done using the cmake-options option.

dest-dirModule setting overrides globalUse this option to change the name a module is given on disk. For example, if your module was extragear/network, you could rename it to extragear-network using this option. Note that although this changes the name of the module on disk, it is not a good idea to include directories or directory separators in the name as this will interfere with any build-dir or source-dir options.
disable-agent-checkCannot be overriddenNormally if you are using SSH to download the Subversion sources (such as if you are using the svn+ssh protocol), kdesrc-build will try and make sure that if you are using ssh-agent, it is actually managing some SSH identities. This is to try and prevent SSH from asking for your pass phrase for every module. You can disable this check by setting disable-agent-check to true.
do-not-compileModule setting overrides global

Use this option to select a specific set of directories not to be built in a module (instead of all of them). The directories not to build should be space-separated.

Note that the sources to the programs will still be downloaded. You can use the checkout-only directive to choose directories that you want to check out.

For example, to hold JuK and KsCD in the kdemultimedia module from compiling, you would add "do-not-compile juk kscd" to your kdemultimedia settings.

See the section called “Removing directories from a build” for an example.

email-addressCannot be overridden

This option was removed in kdesrc-build 1.14.

email-on-compile-errorCannot be overridden

This option was removed in kdesrc-build 1.14.

inst-apps  This option was removed in version 1.10
git-desired-protocolCannot be overridden

This option only applies to modules from a KDE project repository.

What this option actually does is configure which network protocol to prefer when updating source code for these modules. Normally the very-efficient git protocol is used, but this may be blocked in some networks (e.g. corporate intranets, public Wi-Fi). An alternative protocol which is much better supported is the HTTP protocol used for Internet web sites.

If you are using one of these constrained networks you can set this option to http to prefer HTTP communications instead.


You may also need the http-proxy option if an HTTP proxy is also needed for network traffic.

In any other situation you should not set this option as the default protocol is most efficient.

This option was added in kdesrc-build 1.16.

git-repository-baseCannot be overridden

This option, added in version 1.12.1, is used to create a short name to reference a specific Git repository base URL in later module set declarations, which is useful for quickly declaring many Git modules to build.

You must specify two things (separated by a space): The name to assign to the base URL, and the actual base URL itself. For example:

   # other options

   # This is the common path to all anonymous Git server modules.
   git-repository-base kde-git kde:
end global

# Module declarations

   # Now you can use the alias you defined earlier, but only
   # in a module-set.
   repository kde-git

   use-modules module1.git module2.git
end module-set

The module-set's use-modules option created two modules internally, with kdesrc-build behaving as if it had read:

module module1
    repository kde:module1.git
end module

module module2
    repository kde:module2.git
end module

The kde: Git repository prefix used above is a shortcut which will be setup by kdesrc-build automatically. See the TechBase URL Renaming article for more information. Note that unlike most other options, this option can be specified multiple times in order to create as many aliases as necessary.


It is not required to use this option to take advantage of module-set, this option exists to make it easy to use the same repository across many different module sets.

http-proxyModule setting overrides global

This option, if set, uses the specified URL as a proxy server to use for any HTTP network communications (for example, when downloading snapshots for new modules, or the KDE project database).

In addition, kdesrc-build will try to ensure that the tools it depends on also use that proxy server, if possible, by setting the http_proxy environment variable to the indicated server, if that environment variable is not already set.

This option was introduced with kdesrc-build 1.16.

ignore-kde-structureModule setting overrides global

This option is used to store the source and the build files directly in the name of the module. For example, source/extragear/network/telepathy/ktp-text-ui becomes source/ktp-text-ui. This option is disabled by default. If you want to enable this option you need to set it to true.

This option was introduced with kdesrc-build 1.16.

ignore-modulesCan't be overridden

Modules named by this option, which would be chosen by kdesrc-build due to a use-modules option, are instead skipped entirely. Use this option when you want to build an entire kde-projects project grouping except for some specific modules.

The option value does not necessarily have to name the module directly. Any module that has full consecutive parts of its KDE projects module path match one of the option values will be ignored, so you can ignore multiple modules this way.

For example, an option value of libs would result in both kde/kdegraphics/libs and playground/libs being excluded (though not kde/kdelibs since the full part kdelibs is what is compared).

This option was introduced with kdesrc-build 1.16.

install-after-buildModule setting overrides globalThis option is used to install the package after it successfully builds. This option is enabled by default. If you want to disable this, you need to set this option to false in the configuration file. You can also use the --no-install command line flag.
install-session-driverCannot be overridden

By default, kdesrc-build will try to install a driver for the graphical login manager that allows you to login to your kdesrc-build-built KDE desktop.

This driver will alter the following files:

  • ~/.xsession

  • $XDG_CONFIG_HOME/ (normally found at ~/.config/

  • $XDG_CONFIG_HOME/ (normally found at ~/.config/

If you maintain your own login driver then you can disable this feature by setting this option to false.

This option was introduced with kdesrc-build 1.16.


kdesrc-build will not overwrite your existing files (if present) unless you also pass the --delete-my-settings command-line option.

kdedirModule setting overrides globalThis option sets the directory that KDE will be installed to after it is built. It defaults to ~/kde. If you change this to a directory needing root access, you may want to read about the make-install-prefix option as well.
kde-languagesCannot be overridden

This option allows you to choose to download and install localization packages along with KDE. You might do this if you do not live in the United States and would like to use KDE translated into your native language.

To use this option, set it to a space-separated list of languages to install. Each language has a language code associated with it, which you can look up at this page:

It is alright to choose only one language. By default, none are downloaded, which means KDE will display in American English.

For instance, to choose to install French, you would set the option to something like: kde-languages fr. You would still need to use System Settings in order to choose the French language, however.

libpathModule setting overrides globalSet this option to set the environment variable LD_LIBRARY_PATH while building. You cannot override this setting in a module option. The default value is blank, but the paths $KDEDIR/lib and $QTDIR/lib are automatically added. You may use the tilde (~) for any paths you add using this option.
log-dirModule setting overrides globalUse this option to change the directory used to hold the log files generated by the script.
make-install-prefixModule setting overrides global (build system option)Set this variable to a space-separated list, which is interpreted as a command and its options to precede the make install command used to install modules. This is useful for installing packages with Sudo for example, but please be careful while dealing with root privileges.
make-optionsModule setting overrides global (build system option)Set this variable in order to pass command line options to the make command. This is useful for programs such as distcc or systems with more than one processor core.
manual-buildModule setting overrides globalSet the option value to true to keep the build process from attempting to build this module. It will still be kept up-to-date when updating from Subversion. This option is exactly equivalent to the --no-build command line option.
manual-updateModule setting overrides globalSet the option value to true to keep the build process from attempting to update (and by extension, build or install) this module. If you set this option for a module, then you have essentially commented it out.
module-base-pathModule setting overrides global

Set this option to override kdesrc-build's default directory path to the module in question. This can be used, for example, to pull specific branches or tagged versions of libraries. The KDE Source Viewer is invaluable in helping to pick the right path.

Note that kdesrc-build constructs the final path according to the following template: $svn-server/home/kde/$module-base-path.

The default value is either trunk/$module or trunk/KDE/$module, depending on the module name.


Use the branch or tag options instead whenever they are applicable.

nicenessCannot be overriddenSet this option to a number between 20 and 0. The higher the number, the lower a priority kdesrc-build will set for itself, i.e. the higher the number, the "nicer" the program is. The default is 10.
no-svnModule setting overrides globalIf this option is set to true then kdesrc-build will not update the source code for the module automatically. It will still try to build the module if it normally would have tried anyways.
no-rebuild-on-fail This option was removed in version 1.10, since this behavior no longer helps due to fixes in the underlying build system.
override-build-systemModule setting overrides global

This is an advanced option, added in kdesrc-build 1.16.

Normally kdesrc-build will detect the appropriate build system to use for a module after it is downloaded. This is done by checking for the existence of specific files in the module's source directory.

Some modules may include more than one required set of files, which could confuse the auto-detection. In this case you can manually specify the correct build type.

Currently supported build types that can be set are:


Used to build KDE modules. In reality it can be used to build almost any module that uses CMake but it is best not to rely on this.


Used to build the Qt™ library itself.


Used to build Qt™ modules that use qmake-style .pro files.


Used to build modules that use plain Makefiles and that do not require any special configuration.


This is the standard configuration tool used for most Free and open-source software not in any of the other categories.

override-urlModule setting overrides globalIf you set this option, kdesrc-build will use its value as the URL to pass to Subversion completely unchanged. You should generally use this if you want to download a specific release but kdesrc-build cannot figure out what you mean using branch.
persistent-data-fileCannot be overridden

Use this option to change where kdesrc-build stores its persistent data. The default is to store this data in a file called .kdesrc-build-data placed in the same directory as the configuration file in use. If you have multiple available configurations in the same directory you may want to manually set this option so that the different configurations do not end up with conflicting persistent data.

This option was added with kdesrc-build 1.15.

prefixModule setting overrides global

This option controls where to install the module (normally the kdedir setting is used). Using this option allows you to install a module to a different directory than where the KDE Platform libraries are installed, such as if you were using kdesrc-build only to build applications.

You can use ${MODULE} or $MODULE in the path to have them expanded to the module's name.

purge-old-logsModule setting overrides global

This option controls whether old log directories are automatically deleted or not. The default value is true.

qtdirModule setting overrides globalSet this option to set the environment variable QTDIR while building. You cannot override this setting in a module option. If you do not specify this option, it defaults to ${source-dir}/build/qt, which uses the qt module included in the KDE source repository. You may use a tilde (~) to represent your home directory.
remove-after-installModule setting overrides global

If you are low on hard disk space, you may want to use this option in order to automatically delete the build directory (or both the source and build directories for one-time installs) after the module is successfully installed.

Possible values for this option are:

  • none - Do not delete anything (This is the default).

  • builddir - Delete the build directory, but not the source.

  • all - Delete both the source code and build directory.

Note that using this option can have a significant detrimental impact on both your bandwidth usage (if you use all) and the time taken to compile KDE, since kdesrc-build will be unable to perform incremental builds.

repositoryModule setting overrides global

This option was introduced with version 1.10, and is used to specify the Git repository to download the source code for the module. Qt™ (and therefore qt) would need this option, as well as various KDE modules that are in the process of conversion to use Git.

revisionModule setting overrides global

If this option is set to a value other than 0 (zero), kdesrc-build will force the source update to bring the module to the exact revision given, even if options like branch are in effect. If the module is already at the given revision then it will not be updated further unless this option is changed or removed from the configuration.


This option did not work for git-based modules (including kde-projects modules) until kdesrc-build version 1.16.

run-testsModule setting overrides global (build system option)If set to true, then the module will be built with support for running its test suite, and the test suite will be executed as part of the build process. kdesrc-build will show a simple report of the test results. This is useful for developers or those who want to ensure their system is setup correctly.
set-envModule setting overrides global

This option accepts a space-separated set of values, where the first value is the environment variable to set, and the rest of the values is what you want the variable set to. For example, to set the variable RONALD to McDonald, you would put in the appropriate section this command:

set-env RONALD McDonald

This option is special in that it can be repeated without overriding earlier set-env settings in the same section of the configuration file. This way you can set more than one environment variable per module (or globally).

source-dirModule setting overrides globalThis option is used to set the directory on your computer to store the KDE Subversion sources at. If you do not specify this value, the default is ~/kdesrc. You may use the tilde (~) to represent the home directory if using this option.
ssh-identity-fileCannot be overridden

Set this option to control which private SSH key file is passed to the ssh-add command when kdesrc-build is downloading source code from repositories that require authentication. See also: the section called “SSH Agent checks”.

This option was added in version 1.14.2.

stop-on-failureModule setting overrides globalSet this option value to true to cause the script to stop execution after an error occurs during the build or install process. This option is off by default.
svn-serverModule setting overrides global

This option is used to set the server used to check out from Subversion. The default is the anonymous Subversion repository, svn://


If you are developing for KDE, use the Subversion repository that was provided to you when you received your developer account, instead of the anonymous repository.

tagModule setting overrides global

Use this option to download a specific release of a module.

Note: The odds are very good that you do not want to use this option. KDE releases are available in tarball form from The KDE FTP site or one of its mirrors.


This option has only been supported for git-based modules since kdesrc-build 1.16.

use-clean-installModule setting overrides global (build system option)

Set this option to true in order to have kdesrc-build run make uninstall directly before running make install.

This can be useful in ensuring that there are not stray old library files, CMake metadata, etc. that can cause issues in long-lived KDE installations. However this only works on build systems that support make uninstall.

This option was added with kdesrc-build 1.12, but was not documented until kdesrc-build 1.16.

use-cmake This option was removed in kdesrc-build 1.4 as all KDE 4 modules require CMake, and CMake use is not permitted on any other modules.
use-idle-io-priorityCannot be overriddenThis option, added in kdesrc-build 1.12, will cause a lower priority to be used for disk and other I/O usage, which can significantly improve the responsiveness of the rest of the system at the expense of slightly longer running times for kdesrc-build. The default is to be disabled, to enable the lower disk priority set this to true.
use-modulesCan only use in module-set

This option, added in kdesrc-build 1.12.1, allows you to easily specify many different modules to build at the same point in the configuration file.

This option must be used within a module-set. Every identifier passed to this option is internally converted to a kdesrc-build module, with a repository option set to the module-set's repository combined with the identifier name in order to setup the final repository to download from. All other options that are assigned in the module-set are also copied to the generated modules unaltered.

The order that modules are defined in this option is important, because that is also the order that kdesrc-build will process the generated modules when updating, building, and installing. All modules defined in the given module-set will be handled before kdesrc-build moves to the next module after the module-set.

If you need to change the options for a generated module, simply declare the module again after it is defined in the module-set, and set your options as needed. Although you will change the options set for the module this way, the module will still be updated and built in the order set by the module-set (i.e. you can't reorder the build sequence doing this).


The name to use for the module if you do this is simply the name that you passed to use-modules, with the exception that any .git is removed.

See the section called “Module Sets” and git-repository-base for a description of its use and an example.

use-qt-builddir-hackModule setting overrides globalThis option has been removed due to improvements in the Qt™ build system.
use-stable-kdeCan't be overridden

This option is deprecated and will be removed (again) in a future release.

Please use the branch-group instead, which offers more selectivity.