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

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.0
    • Fix Version/s: None
    • Component/s: Build System: CMake
    • Labels:

      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

            Assignee:
            alexandru.croitor Alexandru Croitor
            Reporter:
            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