Autogen: Add AUTO(MOC|RCC|UIC)_EXECUTABLE target properties

Allow to force moc/rcc/uic compiler used for AUTO(MOC|RCC|UIC).

Setting these properties is only necessary if you are going to do
strange things like build these tools as part of your own build system.

Setting these properties will also prevent cmake from testing the
binary: It is user-provided and assumed to be valid.
This commit is contained in:
Tobias Hunger
2018-11-28 16:00:50 +01:00
committed by Brad King
parent 9045f6a30f
commit cd32886b2f
10 changed files with 131 additions and 18 deletions
+3
View File
@@ -129,13 +129,16 @@ Properties on Targets
/prop_tgt/AUTOGEN_TARGET_DEPENDS
/prop_tgt/AUTOMOC_COMPILER_PREDEFINES
/prop_tgt/AUTOMOC_DEPEND_FILTERS
/prop_tgt/AUTOMOC_EXECUTABLE
/prop_tgt/AUTOMOC_MACRO_NAMES
/prop_tgt/AUTOMOC_MOC_OPTIONS
/prop_tgt/AUTOMOC
/prop_tgt/AUTOUIC
/prop_tgt/AUTOUIC_EXECUTABLE
/prop_tgt/AUTOUIC_OPTIONS
/prop_tgt/AUTOUIC_SEARCH_PATHS
/prop_tgt/AUTORCC
/prop_tgt/AUTORCC_EXECUTABLE
/prop_tgt/AUTORCC_OPTIONS
/prop_tgt/BINARY_DIR
/prop_tgt/BUILD_RPATH
+3
View File
@@ -58,6 +58,9 @@ source files at build time and invoke moc accordingly.
This property is initialized by the value of the :variable:`CMAKE_AUTOMOC`
variable if it is set when a target is created.
The ``moc`` executable will be detected automatically, but can be forced to
a certain binary using the :prop_tgt:`AUTOMOC_EXECUTABLE` property.
Additional command line options for ``moc`` can be set via the
:prop_tgt:`AUTOMOC_MOC_OPTIONS` property.
+15
View File
@@ -0,0 +1,15 @@
AUTOMOC_EXECUTABLE
------------------
:prop_tgt:`AUTOMOC_EXECUTABLE` is file path pointing to the ``moc``
executable to use for :prop_tgt:`AUTOMOC` enabled files. Setting
this property will make CMake skip the automatic detection of the
``moc`` binary as well as the sanity-tests normally run to ensure
that the binary is available and working as expected.
Usually this property does not need to be set. Only consider this
property if auto-detection of ``moc`` can not work -- e.g. because
you are building the ``moc`` binary as part of your project.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
+3
View File
@@ -21,6 +21,9 @@ If the ``.qrc`` file is :prop_sf:`GENERATED` though, a
Additional command line options for rcc can be set via the
:prop_sf:`AUTORCC_OPTIONS` source file property on the ``.qrc`` file.
The ``rcc`` executable will be detected automatically, but can be forced to
a certain binary using the :prop_tgt:`AUTORCC_EXECUTABLE` property.
The global property :prop_gbl:`AUTOGEN_TARGETS_FOLDER` can be used to group
the autorcc targets together in an IDE, e.g. in MSVS.
+15
View File
@@ -0,0 +1,15 @@
AUTORCC_EXECUTABLE
------------------
:prop_tgt:`AUTORCC_EXECUTABLE` is file path pointing to the ``rcc``
executable to use for :prop_tgt:`AUTORCC` enabled files. Setting
this property will make CMake skip the automatic detection of the
``rcc`` binary as well as the sanity-tests normally run to ensure
that the binary is available and working as expected.
Usually this property does not need to be set. Only consider this
property if auto-detection of ``rcc`` can not work -- e.g. because
you are building the ``rcc`` binary as part of your project.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
+3
View File
@@ -30,6 +30,9 @@ Additional command line options for ``uic`` can be set via the
The global property :prop_gbl:`AUTOGEN_TARGETS_FOLDER` can be used to group the
autouic targets together in an IDE, e.g. in MSVS.
The ``uic`` executable will be detected automatically, but can be forced to
a certain binary using the :prop_tgt:`AUTOUIC_EXECUTABLE` property.
Source files can be excluded from :prop_tgt:`AUTOUIC` processing by
enabling :prop_sf:`SKIP_AUTOUIC` or the broader :prop_sf:`SKIP_AUTOGEN`.
+15
View File
@@ -0,0 +1,15 @@
AUTOUIC_EXECUTABLE
------------------
:prop_tgt:`AUTOUIC_EXECUTABLE` is file path pointing to the ``uic``
executable to use for :prop_tgt:`AUTOUIC` enabled files. Setting
this property will make CMake skip the automatic detection of the
``uic`` binary as well as the sanity-tests normally run to ensure
that the binary is available and working as expected.
Usually this property does not need to be set. Only consider this
property if auto-detection of ``uic`` can not work -- e.g. because
you are building the ``uic`` binary as part of your project.
See the :manual:`cmake-qt(7)` manual for more information on using CMake
with Qt.
+9
View File
@@ -0,0 +1,9 @@
AUTO*_EXECUTABLE
----------------
* The :prop_tgt:`AUTOMOC_EXECUTABLE`, :prop_tgt:`AUTORCC_EXECUTABLE` and
:prop_tgt:`AUTOUIC_EXECUTABLE` target properties all take a path to an
executable and force automoc/autorcc/autouic to use this executable.
Setting these will also prevent the configure time testing for these
executables. This is mainly useful when you build these tools yourself.