m (KDE and CMake Together moved to Development/KDE and CMake Together) |
(Fix typo) |
||
| Line 127: | Line 127: | ||
Add a unit test, which is executed when running make test | Add a unit test, which is executed when running make test | ||
| − | It will be built with RPATH | + | 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 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. | ||
| Line 137: | Line 137: | ||
Add a test executable | Add a test executable | ||
| − | It will be built with RPATH | + | 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 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. | ||
A page to document the variables, macros and other useful stuff we have to use CMake as the KDE4 buildsystem.
Contents |
They are all interpreted relative to CMAKE_INSTALL_PREFIX
Lots of useful macros:
Use this to add Qt designer ui files to your application/library.
Use this to add Qt designer ui files from Qt version 3 to your application/library.
Use this to add KDE config compiler files to your application/library.
Use optional GENERATE_MOC to generate moc if you use signals in your kcfg files.
Use this to add widget description files for the makekdewidgets code generator for Qt Designer plugins.
Create a KDE plugin (KPart, kioslave, etc.) from the given source files.
It supports KDE4_ENABLE_FINAL.
If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't.
It creates and installs an appropriate libtool la-file.
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.
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.
Equivalent to ADD_EXECUTABLE(), but additionally adds some more features:
** support for KDE4_ENABLE_FINAL ** support for automoc ** 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.
Equivalent to ADD_LIBRARY(), but additionally it supports KDE4_ENABLE_FINAL and under Windows it adds a -DMAKE_<name>_LIB definition to the compilation.
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>
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 with KGlobal::dirs()->addResourceDir( "data", KDESRCDIR ); to be able to use xmlgui and other things in the test, that normally require installation
Notifies the icon cache that new icons have been installed by updating mtime of ${ICON_INSTALL_DIR}/hicolor directory.
Installs all png and svgz files in the current directory to the icon directory given in path, in the subdirectory for the given icon theme.
Create the handbook from the docbookfile (using meinproc)
Install the handbook documentation