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

Details

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

    Description

      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.

       

       

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes