From 6739a12571bfa8b97b00740981e9f6eb5195529f Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Wed, 6 Sep 2017 16:10:47 +0200 Subject: Autogen: Doc: Add Visual Studio PRE_BUILD note to cmake-qt.rst --- Help/manual/cmake-qt.7.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Help/manual/cmake-qt.7.rst b/Help/manual/cmake-qt.7.rst index 55121df..7052e0a 100644 --- a/Help/manual/cmake-qt.7.rst +++ b/Help/manual/cmake-qt.7.rst @@ -214,6 +214,24 @@ overrides options from the :prop_tgt:`AUTORCC_OPTIONS` target property. Source files can be excluded from :prop_tgt:`AUTORCC` processing by enabling :prop_sf:`SKIP_AUTORCC` or the broader :prop_sf:`SKIP_AUTOGEN`. +Visual Studio Generators +======================== + +When using the :manual:`Visual Studio generators ` +CMake tries to use a ``PRE_BUILD`` +:command:`custom command ` instead +of a :command:`custom target ` for autogen. +``PRE_BUILD`` can't be used when the autogen target depends on files. +This happens when + +- :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` is enabled and the origin target + depends on :prop_sf:`GENERATED` files which aren't excluded from autogen by + :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC`, :prop_sf:`SKIP_AUTOGEN` + or :policy:`CMP0071` +- :prop_tgt:`AUTORCC` is enabled and a ``.qrc`` file is listed in + the origin target sources +- :prop_tgt:`AUTOGEN_TARGET_DEPENDS` lists a source file + qtmain.lib on Windows ===================== -- cgit v0.12