Create a KDE application in the form of a module loadable via kdeinit.

A library named kdeinit_<name> will be created and a small executable which links to it.

Supports KDE4_ENABLE_FINAL

If the executable has to be run from the buildtree (e.g. unit tests and code generators used later on when compiling), set the option RUN_UNINSTALLED.

If the executable doesn't have a GUI, use the option NOGUI. By default on OS X application bundles are created, with the NOGUI option no bundles but simple executables are created. Currently it doesn't have any effect on other platforms.

KDE4_ADD_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN)

Equivalent to ADD_EXECUTABLE(), but additionally adds some more features:

support for KDE4_ENABLE_FINAL

support for atomic

automatic RPATH handling

If the executable has to be run from the buildtree (e.g. unit tests and code generators used later on when compiling), set the option RUN_UNINSTALLED.

If the executable doesn't have a GUI, use the option NOGUI. By default on OS X application bundles are created, with the NOGUI option no bundles but simple executables are created. Currently it doesn't have any effect on other platforms.

KDE4_ADD_LIBRARY (name [STATIC | SHARED | MODULE ] file1 ... fileN)

Equivalent to ADD_LIBRARY(), but additionally it supports KDE4_ENABLE_FINAL

Under Windows, -DMAKE_<name>_LIB definition is added to the compilation.

KDE4_ADD_UNIT_TEST (testname [TESTNAME targetname] file1 ... fileN)

Add a unit test, which is executed when running make test

It will be built with RPATH pointing to the build dir

The targets are always created, but only built for the "all" target if the option KDE4_BUILD_TESTS is enabled. Otherwise the rules for the target are created but not built by default. You can build them by manually building the target.

The name of the target can be specified using TESTNAME <targetname>, if it is not given the macro will default to the <testname>

KDE4_ADD_TEST_EXECUTABLE (name file1 ... fileN)

Add a test executable

It will be built with RPATH pointing to the build dir

The targets are always created, but only built for the "all" target if the option KDE4_BUILD_TESTS is enabled. Otherwise the rules for the target are created but not built by default. You can build them by manually building the target.

KDESRCDIR is set to the source directory of the test, this can be used to enable the use of xmlgui and other things in the test that normally require installation

Example

KGlobal::dirs()->addResourceDir("data",KDESRCDIR);

KDE4_UPDATE_ICONCACHE ()

Notifies the icon cache that new icons have been installed by updating mtime of the ${ICON_INSTALL_DIR}/hicolor directory.

KDE4_INSTALL_ICONS (path theme)

Installs all png and svgz files in the current directory that comply to the icon naming scheme to the icon directory given in PATH, in the subdirectory for the given icon THEME.