CMAKE_GLOBAL_AUTOGEN_TARGET.rst 1.0 KB

1234567891011121314151617181920212223242526
  1. CMAKE_GLOBAL_AUTOGEN_TARGET
  2. ---------------------------
  3. Switch to enable generation of a global ``autogen`` target.
  4. When :variable:`CMAKE_GLOBAL_AUTORCC_TARGET` is enabled, a custom target
  5. ``autogen`` is generated. This target depends on all :prop_tgt:`AUTOMOC` and
  6. :prop_tgt:`AUTOUIC` generated ``<ORIGIN>_autogen`` targets in the project.
  7. By building the global ``autogen`` target, all :prop_tgt:`AUTOMOC` and
  8. :prop_tgt:`AUTOUIC` files in the project will be generated.
  9. The name of the global ``autogen`` target can be changed by setting
  10. :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET_NAME`.
  11. By default :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is unset.
  12. See the :manual:`cmake-qt(7)` manual for more information on using CMake
  13. with Qt.
  14. Note
  15. ^^^^
  16. ``<ORIGIN>_autogen`` targets by default inherit their origin target's
  17. dependencies. This might result in unintended dependency target
  18. builds when only ``<ORIGIN>_autogen`` targets are built. A solution is to
  19. disable :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` on the respective origin targets.