Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75859

Add documentation support

    XMLWordPrintable

Details

    • User Story
    • Resolution: Done
    • P1: Critical
    • 6.0.0
    • None
    • Build System
    • None

    Description

      It should be possible to build documentation with CMake + qdoc.

      The plan would be to augment add_qt_docs function to take also a target name for the respective module.

      add_qt_docs(doc/qtwidgets.qdocconf TARGET Widgets)
      

      Based on the target name, we will create a few custom targets: docs_Widgets, prepare_docs_Widgets, generate_docs_Widgets, html_docs_Widgets, qch_docs_Widgets, qtattributionsscanner_Widgets

      There will also be a few repo-level custom targets called docs, prepare_docs, generate_docs, html_docs, qch_docs.

      The dependency between targets would then look something like the following:

      • docs
        • html_docs
          • prepare_docs
            • prepare_docs_Widgets
              • qtattributionsscanner_Widgets 
              • Widgets
            • prepare_docs_Core
              • qtattributionsscanner_Core
              • Core
            • prepare_docs_Gui
              • qtattributionsscanner_Gui 
              • Gui
            • prepare_docs_Sql
              • qtattributionsscanner_Sql 
              • Sql
          • generate_docs
            • generate_docs_Widgets
              • Widgets
            • generate_docs_Core
              • Core
            • generate_docs_Gui
              • Gui
            • generate_docs_Sql
              • Sql

      So there will be one docs, html_docs, prepare_docs custom target in the top-level of a repository (qtbase), and then each add_qt_docs() call will add_custom_target() the necessary bits for the relevant target (Core) and will also use add_dependencies() to set up dependencies between the module specific step (prepare_docs_Core) to the top-level step (prepare_docs).

      There seem to be also install_ custom targets per module and step, aka install_docs_Core, install_qch_docs_Core, install_html_docs_Core, etc. Will have to figure those out as well.

      When calling qdoc for each prepare_docs_foo and generate_docs_foo step, we will need to pass compile definitions and compile options (all compile flags) to qdoc. We expect to be able to do it via generator expressions that extract the flags from the corresponding module target (.e.g Core).

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              lebeernae Leander Beernaert
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes