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

Unable to build project if app qml module name is the same as its URI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.2, 6.3
    • Build System: CMake
    • None
    • Linux/X11, macOS

      When using modern QML CMake API and specifying the URI of the QML module that starts with the executable output name this causes an error like:

      /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot open output file App: Is a directory
      

      This happens because qt6_add_qml_module creates folder structure that uses URI parts and the first part matches the executable name.

      This happens on platforms where executable have no extra suffixes. As the minimum we should throw the explicit FATAL_ERROR at configure time about this issue, suggesting to rename the executable.

      We should not change the default QML module/application directory layout because that would require people to specify an explicit import path in their application.

       

       

        1. QTBUG-98568.tar.gz
          1 kB
          Alexey Edelev
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtbuildsystem Qt Build System Team
            semlanik Alexey Edelev
            Votes:
            10 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes