Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Building of certain modules fails with Unknown CMake command "qt_internal_add_qml_module".
Forum Updated to NodeBB v4.3 + New Features

Building of certain modules fails with Unknown CMake command "qt_internal_add_qml_module".

Scheduled Pinned Locked Moved Unsolved Qt 6
5 Posts 3 Posters 2.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ReneeO
    wrote on 27 Apr 2022, 19:49 last edited by
    #1

    I am trying to package Qt6 for MacPorts and keep running into problems with building modules that define qt_internal_add_qml_module in their CMakeLists.txt (e.g., qt3d, qt5compat, and qtmultimedia).

    I successfully build qtbase using the recommended configure method and use qt-configure-module followed by cmake --build . and cmake --install for the modules. That works well for several of them (e.g., qtdeclarative, qtimageformats, qtlanguageserver, qtshadertools, and qtsvg), but all the ones that attempt to use qt_internal_add_qml_module fail with the error message above. I looked around in the source, but indeed cannot find that function defined anywhere; admittedly, I am not that well versed in cmake so I might just be looking in the wrong places...

    Anyone else experienced this as well and is able to give a pointer on how to fix it?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kkoehne
      Moderators
      wrote on 28 Apr 2022, 14:32 last edited by
      #2

      I don't know what goes wrong for you. Are you sure that you're using a consistent set of modules? Maybe there's another Qt incompatible version lurking somewhere, e.g. set in CMAKE_PREFIX_PATH ?

      Anyhow, to answer some of your questions: qt_internal_add_qml_module is defined in qtdeclarative/src/qml/Qt6QmlBuildInternals.cmake, and (after installation) in <installdir>/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake .

      Director R&D, The Qt Company

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ReneeO
        wrote on 29 Apr 2022, 02:02 last edited by
        #3

        thanks for the response @kkoehne and pointing to where the qt_internal_add_qml_module function is defined. I indeed see it in the source (qtdeclarative-everywhere-src-6.3.0) but it isn't present at the location you mention for after the installation. So clearly something is amiss there, but now I at least have a good idea on where to start to debug it!

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Raureth
          wrote on 28 Nov 2022, 11:44 last edited by
          #4

          I noticed that in this configuration, <installdir>/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake is actually not installed by qtdeclarative. The other cmake files are installed.

          Any idea why this?

          On other platforms like debian (but it configures with cmake directly) there is no such problem.

          1 Reply Last reply
          0
          • R Offline
            R Offline
            Raureth
            wrote on 29 Nov 2022, 13:24 last edited by Raureth
            #5

            @ReneeO, Reason of the issue is described in https://bugreports.qt.io/browse/QTBUG-109003
            I think this can be marked as resolved.

            1 Reply Last reply
            0
            • D dpoblaci referenced this topic on 13 Nov 2023, 09:22

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved