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

qmake2cmake : qt_standard_project_setup() placed before find_package

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.3.0
    • Fix Version/s: None
    • Component/s: Build tools: Other
    • Labels:
      None
    • Commits:
      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

            Assignee:
            jbornema Joerg Bornemann
            Reporter:
            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