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

CMake find Qt6::QWindowsIntegrationPlugin

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.2.2
    • Build System: CMake
    • None
    • Windows

      With Qt5, I was using Qt5::QWindowsIntegrationPlugin to get the dll location to copy it next to my executable.

      With Qt6, the same behavior does not work anymore and the only way I found to expose the Qt6::QWindowsIntegrationPlugin target to CMake seems strange to me. Is it due to something missing (bug ?) or is it the right way of doing this with Qt6/CMake ?

      find_package(Qt6 COMPONENTS Gui Test REQUIRED)
      find_package(Qt6QWindowsIntegrationPlugin PATHS ${Qt6Gui_DIR}) # this line was not needed with Qt5
      
      if (NOT TARGET Qt6::QWindowsIntegrationPlugin)
        message("Without the second find_package, I always end up here")
      endif()
      

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

            qtbuildsystem Qt Build System Team
            vivien delmon Vivien Delmon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes