mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-01 20:28:37 -06:00
QtAutogen: AUTOMOC documentation update
This commit is contained in:
committed by
Brad King
parent
c2211703d3
commit
e324d70409
@@ -15,11 +15,12 @@ source files at build time and invoke moc accordingly.
|
|||||||
the ``Q_OBJECT`` class declaration is expected in the header, and
|
the ``Q_OBJECT`` class declaration is expected in the header, and
|
||||||
``moc`` is run on the header file. A ``moc_foo.cpp`` file will be
|
``moc`` is run on the header file. A ``moc_foo.cpp`` file will be
|
||||||
generated from the source's header into the
|
generated from the source's header into the
|
||||||
:variable:`CMAKE_CURRENT_BINARY_DIR` directory. This allows the
|
``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include``
|
||||||
compiler to find the included ``moc_foo.cpp`` file regardless of the
|
directory which is automatically added to the target's
|
||||||
location the original source. However, if multiple source files
|
:prop_tgt:`INCLUDE_DIRECTORIES`. This allows the compiler to find the
|
||||||
in different directories do this then their generated moc files would
|
included ``moc_foo.cpp`` file regardless of the location the original source.
|
||||||
collide. In this case a diagnostic will be issued.
|
However, if multiple source files in different directories do this then their
|
||||||
|
generated moc files would collide. In this case a diagnostic will be issued.
|
||||||
|
|
||||||
* If an ``#include`` statement like ``#include "foo.moc"`` is found,
|
* If an ``#include`` statement like ``#include "foo.moc"`` is found,
|
||||||
then a ``Q_OBJECT`` is expected in the current source file and ``moc``
|
then a ``Q_OBJECT`` is expected in the current source file and ``moc``
|
||||||
|
|||||||
Reference in New Issue
Block a user