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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.2
    • 5.9.0, 5.9.1
    • Build System: CMake
    • None
    • * 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
    • 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

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

        Activity

          People

            krf Kevin Funk
            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