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

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes