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

Cmake started requiring private headers being installed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.1.1
    • 5.1.0
    • Build System
    • None
    • Debian Sid.

    Description

      This is a regression WRT 5.0.2.

      Since 5.1.0, adding to a CMakeLists.txt file the following stanzas:

      FIND_PACKAGE(Qt5Widgets REQUIRED)
      FIND_PACKAGE(Qt5Network REQUIRED)

      Makes CMake output:

      CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:15 (message):
        The imported target "Qt5::Widgets" references the file
      
           "/usr/include/qt5/QtWidgets/5.1.0"
      
        but this file does not exist.  Possible reasons include:
      
        * The file was deleted, renamed, or moved to another location.
      
        * An install or uninstall procedure did not complete successfully.
      
        * The installation package was faulty and contained
      
           "/usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake"
      
        but not all the files it references.
      
      Call Stack (most recent call first):
        /usr/lib/x86_64-linux-gnu/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:52 (_qt5_Widgets_check_file_exists)
        CMakeLists.txt:21 (FIND_PACKAGE)
      

      This is avoided by installing the private headers of qt base. But we packagers want to avoid users installing private headers, because we can't guarantee API/ABI stability.

      If CMake files are needed for the private headers, they should have separate fooPrivateConfig.cmake files.

      There is also the chance that the path /usr/include/qt5/QtWidgets/<qt_version>/ could hold non-private stuff (not the case here), but that doesn't sounds too good because the path is versioned.

      Attachments

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            lisandropm Lisandro Damián Nicanor Pérez Meyer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: