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

qmake2cmake : qt_standard_project_setup() placed before find_package

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.3.0
    • Build tools: Other
    • None
    • 4e34041768 (qt/qmake2cmake/dev)

    Description

      the cmakelists.txt generated by qmake2cmake from a plain qtquick .pro file generates the following error:

      CMake Error at CMakeLists.txt:5 (qt_standard_project_setup):
      Unknown CMake command "qt_standard_project_setup".

      qt_standard_project_setup is called before find_package.

      Manually moving the qt_standard_project_setup to after the find_package resolved the problem:

      find_package(QT NAMES Qt5 Qt6 REQUIRED COMPONENTS Core)
      find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui Quick)

      qt_standard_project_setup()

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            apederse Asle Pedersen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes