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

Document "qt-cmake" or add an example which folder in the Qt installation should be listed in CMAKE_PREFIX_PATH

    XMLWordPrintable

Details

    • All

    Description

      The current docs (https://doc-snapshots.qt.io/qt6-dev/cmake-get-started.html) tell the user:

      " 1. Set the CMAKE_PREFIX_PATH environment variable to include the Qt 6 installation prefix."

      and then refer to QtCreator which will set it up right automatically...

      I think it is better to provide an example which folder from a Qt installation should be used. I'm not sure if "installation prefix" is self-explainatory.

      On my machine I have following folders to choose from:

      ➜  ~ ls ~/development/installs/qt6dev 
      bin          include      libexec      modules      plugins      translations
      doc          lib          mkspecs      phrasebooks  qml
      ➜  ~ ls ~/Qt                         
      6.1.1               Examples            MaintenanceTool.dat dist
      6.1.2               InstallationLog.txt MaintenanceTool.ini installerResources
      6.2.0               Licenses            Qt Creator.app      network.xml
      Docs                MaintenanceTool.app components.xml
      ➜  ~ 
      

      Alternatively, and maybe even better, in addition, the docs mention and explain "bin/qt-cmake". Imagine someone who used qmake before and did not read a book about CMake lands on this page. IMHO, I think this is the user who this page is for. With qmake, you just call the one from a Qt installation you wanna use and the rest is done for you. qt-cmake does something similar but it is not documented

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-95271
          # Subject Branch Project Status CR V

          Activity

            People

              docteam Qt Documentation Team
              vminenko Vladimir Minenko
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes