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

Qt5QmlConfig.cmake doesn't set plugin locations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.3.0
    • Build System
    • None
    • Windows 7, Visual Studio 2010 x64
    • fb3f7b3ede45ca56643082787f091f15d1ab08db

    Description

      The manual section on CMake (https://qt-project.org/doc/qt-5/cmake-manual.html) suggests using the variable Qt5<Module>_PLUGINS for finding plugin locations. This works e.g. for the Qt5Gui module. Qt5GuiConfig.cmake contains the following lines:

      macro(_populate_Gui_plugin_properties Plugin Configuration PLUGIN_LOCATION)
          set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
      
          set(imported_location "${_qt5Gui_install_prefix}/plugins/${PLUGIN_LOCATION}")
          _qt5_Gui_check_file_exists(${imported_location})
          set_target_properties(Qt5::${Plugin} PROPERTIES
              "IMPORTED_LOCATION_${Configuration}" ${imported_location}
          )
      endmacro()
      
      file(GLOB pluginTargets "${CMAKE_CURRENT_LIST_DIR}/Qt5Gui_*Plugin.cmake")
      foreach(pluginTarget ${pluginTargets})
          include(${pluginTarget})
      endforeach()
      

      The lib/cmake/Qt5Gui contains Qt5Gui_*Plugin.cmake files.

      lib/cmake/Qt5Qml also contains a Qt5Qml_QtQuick2Plugin.cmake, but the code in Qt5QmlConfig.cmake to include it is missing. Also, the CMake documentation chapter does not mention Qt5Qml to have plugins.

      I'm sorry if I didn't select the right components in this bug tracker, but none seems to be exactly fitting.

      Attachments

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

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            cmdr Fabian Herb
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes