AUTOUIC.rst 1.1 KB

123456789101112131415161718192021222324
  1. AUTOUIC
  2. -------
  3. Should the target be processed with autouic (for Qt projects).
  4. ``AUTOUIC`` is a boolean specifying whether CMake will handle
  5. the Qt ``uic`` code generator automatically, i.e. without having to use
  6. the :module:`QT4_WRAP_UI() <FindQt4>` or ``QT5_WRAP_UI()`` macro. Currently
  7. Qt4 and Qt5 are supported.
  8. When this property is ``ON``, CMake will scan the source files at build time
  9. and invoke ``uic`` accordingly. If an ``#include`` statement like
  10. ``#include "ui_foo.h"`` is found in ``foo.cpp``, a ``foo.ui`` file is
  11. expected next to ``foo.cpp``, and ``uic`` is run on the ``foo.ui`` file.
  12. This property is initialized by the value of the :variable:`CMAKE_AUTOUIC`
  13. variable if it is set when a target is created.
  14. Additional command line options for ``uic`` can be set via the
  15. :prop_sf:`AUTOUIC_OPTIONS` source file property on the ``foo.ui`` file.
  16. The global property :prop_gbl:`AUTOGEN_TARGETS_FOLDER` can be used to group the
  17. autouic targets together in an IDE, e.g. in MSVS.
  18. See the :manual:`cmake-qt(7)` manual for more information on using CMake
  19. with Qt.