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

Add IMPORT_PREFIX/include paths for Qt module targets to support Conan build Qt packages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 6.0
    • Build System: CMake

    Description

      Currently, we add a ${qt_prefix}/include path as a TARGET_INCLUDE_DIRECTORIES on the Qt6::Platform target.

      When building a module with Conan though, the include files are installed into a different directory than the Qt essential one.

      Which means that you get errors like

      ../main.cpp:4:10: fatal error: QtNetworkAuth/QOAuth2AuthorizationCodeFlow: No such file or directory
       #include <QtNetworkAuth/QOAuth2AuthorizationCodeFlow>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      

      To fix that, we can add a IMPORT_PREFIX/include path as an include dir on each module target. We might need to do something similar for macOS framework builds as well.

      Attachments

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

        Activity

          People

            alexandru.croitor Alexandru Croitor
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes