FindKDE3¶
Note
This module is specifically intended for KDE version 3, which is obsolete and no longer maintained. For modern application development using KDE technologies with CMake, use a newer version of KDE, and refer to the KDE documentation.
This module finds KDE 3 include directories, libraries, and KDE-specific preprocessor tools. It provides usage requirements for building KDE 3 software and defines several helper commands to simplify working with KDE 3 in CMake.
Result Variables¶
This module defines the following variables:
KDE3_FOUNDBoolean indicating whether KDE 3 is found.
KDE3_DEFINITIONSCompiler definitions required for compiling KDE 3 software.
KDE3_INCLUDE_DIRSThe KDE and the Qt include directories, for use with the
target_include_directories()command.KDE3_LIB_DIRThe directory containing the installed KDE 3 libraries, for use with the
target_link_directories()command.QT_AND_KDECORE_LIBSA list containing both the Qt and the kdecore library, typically used together when linking KDE 3.
Cache Variables¶
The following cache variables may also be set:
KDE3_INCLUDE_DIRThe directory containing KDE 3 header files.
KDE3_DCOPIDL_EXECUTABLEThe path to the
dcopidlexecutable.KDE3_DCOPIDL2CPP_EXECUTABLEThe path to the
dcopidl2cppexecutable.KDE3_KCFGC_EXECUTABLEThe path to the
kconfig_compilerexecutable.
Hints¶
This module accepts the following variables:
KDE3_BUILD_TESTSProvided as a user adjustable option. Set this variable to boolean true to build KDE 3 testcases.
Commands¶
This module provides the following commands to work with KDE 3 in CMake:
- kde3_automoc¶
Enables automatic processing with
mocfor the given source files:kde3_automoc(<sources>...)
Call this command to enable automatic
mocfile handling. For example, if a source file (e.g.,foo.cpp) containsinclude "foo.moc", amocfile for the corresponding header (foo.h) will be generated automatically. To skip processing for a specific source file, set theSKIP_AUTOMOCsource file property.
- kde3_add_moc_files¶
Processes header files with
moc:kde3_add_moc_files(<variable> <headers>...)
If not using
kde3_automoc(), this command can be used to generatemocfiles for one or more<headers>files. The generated files are named<filename>.moc.cppand the resulting list of these generated source files is stored in the variable named<variable>for use in project targets.
- kde3_add_dcop_skels¶
Generates KIDL and DCOP skeletons:
kde3_add_dcop_skels(<variable> <dcop-headers>...)
This command generates
.kidland DCOP skeleton source files from the given DCOP header files. The resulting list of generated source files is stored in the variable named<variable>for use in project targets.
- kde3_add_dcop_stubs¶
Generates DCOP stubs:
kde3_add_dcop_stubs(<variable> <headers>...)
Use this command to generate DCOP stubs from one or more given header files. The resulting list of generated source files is stored in the variable named
<variable>for use in project targets.
- kde3_add_ui_files¶
Adds Qt designer UI files:
kde3_add_ui_files(<variable> <ui-files>...)
This command creates the implementation files from the given Qt designer
.uifiles. The resulting list of generated files is stored in the variable named<variable>for use in project targets.
- kde3_add_kcfg_files¶
Adds KDE kconfig compiler files:
kde3_add_kcfg_files(<variable> <kcfgc-files>...)
Use this command to add KDE kconfig compiler files (
.kcfgc) to the application/library. The resulting list of generated source files is stored in the variable named<variable>for use in project targets.
- kde3_install_libtool_file¶
Creates and installs a libtool file:
kde3_install_libtool_file(<target>)
This command creates and installs a basic libtool file for the given target
<target>.
- kde3_add_executable¶
Adds KDE executable:
kde3_add_executable(<name> <sources>...)
This command is functionally identical to the built-in
add_executable()command. It was originally intended to support additional features in future versions of this module.
- kde3_add_kpart¶
Creates a KDE plugin:
kde3_add_kpart(<name> [WITH_PREFIX] <sources>...)
This command creates a KDE plugin (KPart, kioslave, etc.) from one or more source files
<sources>. It also creates and installs an appropriate libtool.lafile.If the
WITH_PREFIXoption is given, the resulting plugin name will be prefixed withlib. Otherwise, no prefix is added.
- kde3_add_kdeinit_executable¶
Creates a KDE application as a module loadable via kdeinit:
kde3_add_kdeinit_executable(<name> <sources>...)
This command creates a library named
kdeinit_<name>from one or more source files<sources>. It also builds a small executable linked against this library.
Examples¶
Finding KDE 3:
find_package(KDE3)