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

The CMake script `Qt5CoreConfig.cmake` errors if Qt5 is built from source.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.9.0, 5.9.1
    • Fix Version/s: 5.9.2
    • Component/s: Build System: CMake
    • Labels:
      None
    • Environment:
      * CMake 3.9.0-rc5 or CMake 3.8.2
       * Visual Studio Enterprise 2017
       * Qt 5.9.0 or Qt 5.9.1
       * Windows 10
    • Commits:
      5978be31295eb78106fa968a86ba3182f31b2d21

      Description

      Steps to reproduce the issue

      Compile Qt with VS2017 using this command:

      configure.bat -debug-and-release -opensource -confirm-license -opengl dynamic -no-dbus -nomake tools -nomake examples -nomake tests -skip qtwebengine -platform win32-msvc

      Running a simple CMake like the one attached results in this error:

      CMake Error at C:/Qt/qt-everywhere-opensource-src-5.9.1-x64/qtbase/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):
       The imported target "Qt5::Core" references the file
      
       "C:/Qt/qt-everywhere-opensource-src-5.9.1-x64/qtbase/C:/Qt/qt-everywhere-opensource-src-5.9.1-x64/qtbase//mkspecs/win32-msvc"
      
       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
      
       "C:/Qt/qt-everywhere-opensource-src-5.9.1-x64/qtbase/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"
      
       but not all the files it references.
      
      Call Stack (most recent call first):
       C:/Qt/qt-everywhere-opensource-src-5.9.1-x64/qtbase/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:50 (_qt5_Core_check_file_exists)
       C:/Qt/qt-everywhere-opensource-src-5.9.1-x64/qtbase/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:181 (include)
       C:/Qt/qt-everywhere-opensource-src-5.9.1-x64/qtbase/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:95 (find_package)
       C:/Qt/qt-everywhere-opensource-src-5.9.1-x64/qtbase/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:95 (find_package)
       CMakeLists.txt:17 (find_package)
      
      Configuring incomplete, errors occurred!
      

       

      A simple fix is to remove line 2 in Qt5CoreConfigExtrasMkspecDir.cmake which reads in my case:

      set(_qt5_corelib_extra_includes "${_qt5Core_install_prefix}/C:/Qt/qt-everywhere-opensource-src-5.9.1-x64/qtbase//mkspecs/win32-msvc")

       

        Attachments

        For Gerrit Dashboard: QTBUG-61768
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            krf Kevin Funk
            Reporter:
            diemmarkus Markus Diem
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes