CMP0020.rst 1.3 KB

12345678910111213141516171819202122232425262728
  1. CMP0020
  2. -------
  3. .. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
  4. .. include:: include/REMOVED_PROLOGUE.rst
  5. Automatically link Qt executables to ``qtmain`` target on Windows.
  6. CMake 2.8.10 and lower required users of Qt to always specify a link
  7. dependency to the ``qtmain.lib`` static library manually on Windows.
  8. CMake 2.8.11 gained the ability to evaluate generator expressions
  9. while determining the link dependencies from ``IMPORTED`` targets. This
  10. allows CMake itself to automatically link executables which link to Qt
  11. to the ``qtmain.lib`` library when using ``IMPORTED`` Qt targets. For
  12. applications already linking to ``qtmain.lib``, this should have little
  13. impact. For applications which supply their own alternative WinMain
  14. implementation and for applications which use the QAxServer library,
  15. this automatic linking will need to be disabled as per the
  16. documentation.
  17. The ``OLD`` behavior for this policy is not to link executables to
  18. ``qtmain.lib`` automatically when they link to the QtCore ``IMPORTED`` target.
  19. The ``NEW`` behavior for this policy is to link executables to ``qtmain.lib``
  20. automatically when they link to QtCore ``IMPORTED`` target.
  21. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.8.11
  22. .. |WARNED_OR_DID_NOT_WARN| replace:: warned
  23. .. include:: include/REMOVED_EPILOGUE.rst