找到KDE3

找到 KDE3 包含和库目录、KDE ​​预处理器并定义一些宏

该模块定义了以下变量:

KDE3_DEFINITIONS

编译 KDE 软件所需的编译器定义

KDE3_INCLUDE_DIR

KDE 包含目录

KDE3_INCLUDE_DIRS

KDE 和 Qt 包含目录,用于 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(文件 1 ... 文件 N)

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 文件 1 ... 文件 N )

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 文件 1.kcfgc ... 文件 N.kcfgc )

Use this to add KDE kconfig compiler files to your application/library.

KDE3_INSTALL_LIBTOOL_FILE(目标)

This will create and install a simple libtool file for the given target.

KDE3_ADD_EXECUTABLE(名称文件 1 ... 文件 N )

Currently identical to add_executable(), may provide some advanced
features in the future.

KDE3_ADD_KPART(名称 [WITH_PREFIX] 文件 1 ... 文件 N )

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(名称文件 1 ... 文件 N )

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>