summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-qt.7.rst23
-rw-r--r--Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst2
-rw-r--r--Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst2
-rw-r--r--Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst8
-rw-r--r--Help/prop_tgt/AUTOMOC.rst13
-rw-r--r--Help/release/dev/QtAutogen_Contain.rst10
6 files changed, 37 insertions, 21 deletions
diff --git a/Help/manual/cmake-qt.7.rst b/Help/manual/cmake-qt.7.rst
index 7827065..80b0f49 100644
--- a/Help/manual/cmake-qt.7.rst
+++ b/Help/manual/cmake-qt.7.rst
@@ -22,12 +22,11 @@ Qt 4 and Qt 5 may be used together in the same
.. code-block:: cmake
- cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
+ cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR)
project(Qt4And5)
set(CMAKE_AUTOMOC ON)
- set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5 COMPONENTS Widgets DBus REQUIRED)
add_executable(publisher publisher.cpp)
@@ -73,9 +72,12 @@ The ``moc`` command line will consume the :prop_tgt:`COMPILE_DEFINITIONS` and
:prop_tgt:`INCLUDE_DIRECTORIES` target properties from the target it is being
invoked for, and for the appropriate build configuration.
-Generated ``moc_*.cpp`` and ``*.moc`` files are placed in the build directory
-so it is convenient to set the :variable:`CMAKE_INCLUDE_CURRENT_DIR`
-variable. The :prop_tgt:`AUTOMOC` target property may be pre-set for all
+The generated ``moc_*.cpp`` and ``*.moc`` files are placed in the
+``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include`` directory which is
+automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
+(This differs from CMake 3.7 and below; see their documentation for details.)
+
+The :prop_tgt:`AUTOMOC` target property may be pre-set for all
following targets by setting the :variable:`CMAKE_AUTOMOC` variable. The
:prop_tgt:`AUTOMOC_MOC_OPTIONS` target property may be populated to set
options to pass to ``moc``. The :variable:`CMAKE_AUTOMOC_MOC_OPTIONS`
@@ -94,10 +96,13 @@ If a preprocessor ``#include`` directive is found which matches
``ui_<basename>.h``, and a ``<basename>.ui`` file exists, then ``uic`` will
be executed to generate the appropriate file.
-Generated ``ui_*.h`` files are placed in the build directory so it is
-convenient to set the :variable:`CMAKE_INCLUDE_CURRENT_DIR` variable. The
-:prop_tgt:`AUTOUIC` target property may be pre-set for all following targets
-by setting the :variable:`CMAKE_AUTOUIC` variable. The
+The generated generated ``ui_*.h`` files are placed in the
+``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include`` directory which is
+automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
+(This differs from CMake 3.7 and below; see their documentation for details.)
+
+The :prop_tgt:`AUTOUIC` target property may be pre-set for all following
+targets by setting the :variable:`CMAKE_AUTOUIC` variable. The
:prop_tgt:`AUTOUIC_OPTIONS` target property may be populated to set options
to pass to ``uic``. The :variable:`CMAKE_AUTOUIC_OPTIONS` variable may be
populated to pre-set the options for all following targets. The
diff --git a/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst b/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst
index 5a69ef3..fae5626 100644
--- a/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst
+++ b/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst
@@ -1,7 +1,7 @@
AUTOGEN_TARGETS_FOLDER
----------------------
-Name of :prop_tgt:`FOLDER` for ``*_automoc`` targets that are added automatically by
+Name of :prop_tgt:`FOLDER` for ``*_autogen`` targets that are added automatically by
CMake for targets for which :prop_tgt:`AUTOMOC` is enabled.
If not set, CMake uses the :prop_tgt:`FOLDER` property of the parent target as a
diff --git a/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst b/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst
index 671f86a..17666e4 100644
--- a/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst
+++ b/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst
@@ -1,7 +1,7 @@
AUTOMOC_TARGETS_FOLDER
----------------------
-Name of :prop_tgt:`FOLDER` for ``*_automoc`` targets that are added automatically by
+Name of :prop_tgt:`FOLDER` for ``*_autogen`` targets that are added automatically by
CMake for targets for which :prop_tgt:`AUTOMOC` is enabled.
This property is obsolete. Use :prop_gbl:`AUTOGEN_TARGETS_FOLDER` instead.
diff --git a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst
index 5063244..f522c6b 100644
--- a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst
+++ b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst
@@ -1,16 +1,16 @@
AUTOGEN_TARGET_DEPENDS
----------------------
-Target dependencies of the corresponding ``_automoc`` target.
+Target dependencies of the corresponding ``_autogen`` target.
Targets which have their :prop_tgt:`AUTOMOC` target ``ON`` have a
-corresponding ``_automoc`` target which is used to autogenerate generate moc
-files. As this ``_automoc`` target is created at generate-time, it is not
+corresponding ``_autogen`` target which is used to autogenerate generate moc
+files. As this ``_autogen`` target is created at generate-time, it is not
possible to define dependencies of it, such as to create inputs for the ``moc``
executable.
The ``AUTOGEN_TARGET_DEPENDS`` target property can be set instead to a list of
-dependencies for the ``_automoc`` target. The buildsystem will be generated to
+dependencies for the ``_autogen`` target. The buildsystem will be generated to
depend on its contents.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
diff --git a/Help/prop_tgt/AUTOMOC.rst b/Help/prop_tgt/AUTOMOC.rst
index 8143ba9..30a39b1 100644
--- a/Help/prop_tgt/AUTOMOC.rst
+++ b/Help/prop_tgt/AUTOMOC.rst
@@ -15,11 +15,12 @@ source files at build time and invoke moc accordingly.
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
generated from the source's header into the
- :variable:`CMAKE_CURRENT_BINARY_DIR` directory. This allows the
- compiler to find the included ``moc_foo.cpp`` file regardless of the
- location the original source. 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.
+ ``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include``
+ directory which is automatically added to the target's
+ :prop_tgt:`INCLUDE_DIRECTORIES`. This allows the compiler to find the
+ included ``moc_foo.cpp`` file regardless of the location the original source.
+ 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,
then a ``Q_OBJECT`` is expected in the current source file and ``moc``
@@ -30,7 +31,7 @@ source files at build time and invoke moc accordingly.
alternative extensions, such as ``hpp``, ``hxx`` etc when searching
for headers. The resulting moc files, which are not included as shown
above in any of the source files are included in a generated
- ``<targetname>_automoc.cpp`` file, which is compiled as part of the
+ ``moc_compilation.cpp`` file, which is compiled as part of the
target.
This property is initialized by the value of the :variable:`CMAKE_AUTOMOC`
diff --git a/Help/release/dev/QtAutogen_Contain.rst b/Help/release/dev/QtAutogen_Contain.rst
new file mode 100644
index 0000000..182233b
--- /dev/null
+++ b/Help/release/dev/QtAutogen_Contain.rst
@@ -0,0 +1,10 @@
+QtAutogen_Contain
+-----------------
+
+* When using AUTOMOC or AUTOUIC, generated
+ ``moc_*``, ``*.moc`` and ``ui_*`` are placed in the
+ ``<CMAKE_CURRENT_BINARY_DIR>/<TARGETNAME>_autogen/include`` directory which
+ is automatically added to the target's :prop_tgt:`INCLUDE_DIRECTORIES`.
+ It is therefore not necessary anymore to have
+ :variable:`CMAKE_CURRENT_BINARY_DIR` in the target's
+ :prop_tgt:`INCLUDE_DIRECTORIES`.