Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qt_generate_moc.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2020 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\page qt-generate-moc.html
6
\ingroup cmake-commands-qtcore
7
8
\title qt_generate_moc
9
\keyword qt6_generate_moc
10
11
\summary {Calls moc on an input file.}
12
13
\include cmake-find-package-core.qdocinc
14
15
\cmakecommandsince 5.0
16
17
\section1 Synopsis
18
19
\badcode
20
qt_generate_moc(src_file dest_file
21
[TARGET target])
22
\endcode
23
24
\versionlessCMakeCommandsNote qt6_generate_moc()
25
26
\section1 Description
27
28
Creates a rule to call the \l{moc}{Meta-Object Compiler (moc)} on \c src_file
29
and store the output in \c dest_file.
30
31
\note This is a low-level macro. See the \l{CMake AUTOMOC Documentation} for a
32
more convenient way to let source files be processed with \c{moc}.
33
\l qt_wrap_cpp is also similar, but automatically generates a temporary file
34
path for you.
35
36
\section1 Arguments
37
38
You can set an explicit \c{TARGET}. This will make sure that the target
39
properties \c{INCLUDE_DIRECTORIES} and \c{COMPILE_DEFINITIONS} are also used
40
when scanning the source files with \c{moc}.
41
42
\section1 Examples
43
44
\snippet cmake-macros/examples.cmake qt_generate_moc
45
*/
qtbase
src
corelib
doc
src
cmake
qt_generate_moc.qdoc
Generated on
for Qt by
1.14.0