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

Qt 5.1 problems Qt5::XmlPatterns (VS2012 + CMake)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.2.0 Alpha
    • 5.1.0
    • Build System
    • None
    • Windows 8, Visual Studio 2012 x64, CMake 2.8.11.2
    • 21fd5baf804ca9dfe5a52924a9c421951db8fd4f

    Description

      I build Qt5.1 for VS2012 x64. Now I wanted to use Qt to build a simple UI application. Unfortunately CMake gives me some error messages:

      CMake Error at C:/thirdparty/vs2012/x64/qt-everywhere-opensource-src-5.1.0/qtbase/lib/cmake/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake:15 (message):
        The imported target "Qt5::XmlPatterns" references the file
      
           "C:/thirdparty/vs2012/x64/qt-everywhere-opensource-src-5.1.0/qtbase/include/QtXmlPatterns/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
      
           "C:/thirdparty/vs2012/x64/qt-everywhere-opensource-src-5.1.0/qtbase/lib/cmake/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake"
      

      but not all the files it references.

      Call Stack (most recent call first):
        C:/thirdparty/vs2012/x64/qt-everywhere-opensource-src-5.1.0/qtbase/lib/cmake/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake:58 (_qt5_XmlPatterns_check_file_exists)
        CMakeLists.txt:59 (find_package)
      

      The same project worked with Qt 5.0.2 and Qt 5.0.1.

      I setted the path for Qt5Core_DIR and Qt5Xml_DIR, but it does not work Qt5XmlPatterns_DIR. When looking in the Qt lib directory I see that the Qt5XmlPatterns where build successfully - I can also exectued the designer application.

      I build Qt 5.1.0 using this instructions:

      configure -developer-build -opensource -nomake examples -nomake tests
      nmake
      The directory "C:/thirdparty/vs2012/x64/qt-everywhere-opensource-src-5.1.0/qtbase/include/QtXmlPatterns/5.1.0" does not exist. But the directory "C:/thirdparty/vs2012/x64/qt-everywhere-opensource-src-5.1.0/qtbase/include/QtXmlPatterns" does exist. The directory contains only one file: "QtXmlPatternsDepends"

      I copied the files from the directory "C:\thirdparty\vs2012\x64\qt-everywhere-opensource-src-5.1.0\qtxmlpatterns\include\QtXmlPatterns" to "C:\thirdparty\vs2012\x64\qt-everywhere-opensource-src-5.1.0\qtxmlpatterns\include\QtXmlPatterns\5.1.0" and did the same for QtDeclarative and QtScript all errors in CMake are gone - but when compiling some headers can not be found..

      Other Workaround:
      I'm using the self-built version of Qt5.1 for vs2012 and I had to modify Qt5xxx.cmake files in each ${prefix}/lib/cmake/${Qt5LibraryName} folder. For example, I had to modify Qt5AxContainer.cmake from

      . . . set(_Qt5AxContainer_OWN_INCLUDE_DIRS) . .

      to

      . . set(_Qt5AxContainer_OWN_INCLUDE_DIRS "${_qt5Gui_install_prefix}/../qtactiveqt/include/" "${_qt5Gui_install_prefix}/../qtactiveqt/include/ActiveQt" ) . .

      I found _Qt5XXX_OWN_INCLUDE_DIRS is for directory path of actual headers and had to add/modify several paths correctly.

      Though I had not filed up this behavior to Qt's bug tracking system yet, it seems to be bug in build script.

      Attachments

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

        Activity

          People

            stephen.kelly Stephen Kelly (Unused account) (Inactive)
            vertexwahn Julian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes