FindKDE3¶
查找 KDE3 include 和 library 目录、KDE 预处理器并定义一些宏
该模块定义以下变量
KDE3_DEFINITIONS
编译 KDE 软件所需的编译器定义
KDE3_INCLUDE_DIR
KDE include 目录
KDE3_INCLUDE_DIRS
KDE 和 Qt include 目录,用于与 include_directories() 结合使用
KDE3_LIB_DIR
安装 KDE 库的目录,用于与 link_directories() 结合使用
QT_AND_KDECORE_LIBS
它同时包含 Qt 和 kdecore 库
KDE3_DCOPIDL_EXECUTABLE
dcopidl 可执行文件
KDE3_DCOPIDL2CPP_EXECUTABLE
dcopidl2cpp 可执行文件
KDE3_KCFGC_EXECUTABLE
kconfig_compiler 可执行文件
KDE3_FOUND
如果以上全部已找到,则设置为 TRUE
提供以下用户可调节选项
KDE3_BUILD_TESTS
启用此选项可构建 KDE 测试用例
它还添加以下宏(来自 KDE3Macros.cmake
):SRCS_VAR
始终是你应用程序或库的源文件列表所在的变量。
KDE3_AUTOMOC(file1 ... fileN)
Call this if you want to have automatic moc file handling.
This means if you include "foo.moc" in the source file foo.cpp
a moc file for the header foo.h will be created automatically.
You can set the property SKIP_AUTOMAKE using set_source_files_properties()
to exclude some files in the list from being processed.
KDE3_ADD_MOC_FILES(SRCS_VAR file1 ... fileN )
If you don't use the KDE3_AUTOMOC() macro, for the files
listed here moc files will be created (named "foo.moc.cpp")
KDE3_ADD_DCOP_SKELS(SRCS_VAR header1.h ... headerN.h )
Use this to generate DCOP skeletions from the listed headers.
KDE3_ADD_DCOP_STUBS(SRCS_VAR header1.h ... headerN.h )
Use this to generate DCOP stubs from the listed headers.
KDE3_ADD_UI_FILES(SRCS_VAR file1.ui ... fileN.ui )
Use this to add the Qt designer ui files to your application/library.
KDE3_ADD_KCFG_FILES(SRCS_VAR file1.kcfgc ... fileN.kcfgc )
Use this to add KDE kconfig compiler files to your application/library.
KDE3_INSTALL_LIBTOOL_FILE(target)
This will create and install a simple libtool file for the given target.
KDE3_ADD_EXECUTABLE(name file1 ... fileN )
Currently identical to add_executable(), may provide some advanced
features in the future.
KDE3_ADD_KPART(name [WITH_PREFIX] file1 ... fileN )
Create a KDE plugin (KPart, kioslave, etc.) from the given source files.
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.
KDE3_ADD_KDEINIT_EXECUTABLE(name file1 ... fileN )
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.
已不再支持启用一体化编译的 KDE3_ENABLE_FINAL 选项。
作者:Alexander Neundorf <neundorf@kde.org>