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

Allow `qt_add_qml_module` target import/dependencies to work on imported targets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.6
    • Build System: CMake
    • None

    Description

      Right now there is a hard exclusion in `qt6_query_qml_module` against imported targets

          get_target_property(is_imported ${target} IMPORTED)
          if(is_imported)
              message(FATAL_ERROR
                  "Only targets built by the project can be used with this command, "
                  "but target \"${target}\" is imported."
              )
          endif()
      

      This is unfortunate because using targets directly would make configure time checks much easier. Probably nowadays the import target restriction can be dropped if the appropriate properties are exported. But there might need some design question around the dependency URI passed by the user vs the one exported by the target.

      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
              lecris Cristian Le
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes