title: Qt 5.1 problems Qt5::XmlPatterns (VS2012 + CMake)
body: <p>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:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>The same project worked with Qt 5.0.2 and Qt 5.0.1.</p>
  
  <p>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.</p>
  
  <p>I build Qt 5.1.0 using this instructions:</p>
  
  <ol>
  <li>configure -developer-build -opensource -nomake examples -nomake tests</li>
  <li>nmake</li>
  </ol>
  
  <p>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"</p>
  
  <p>Any ideas what went wrong?</p>
  
  <p><strong>UPDATE</strong>: I now used the installer provided from the Qt website (MS2012 x64). After downloading and installing it I tried to setup the project with the installed version. It worked this time –maybe  something went wrong when building Qt 5.1.0 – BUT: It seems that the CMake configuration file is pointing to the wrong directory (to “qtbase” instead of “qtxmlpatterns”) – maybe there is something not working properly in the Qt5XmlPatternsConfig.cmake file…</p>
  
  <p><strong>2nd UPDATE:</strong> I rebuilt Qt5.1 new from scratch - but I get still the same errors...</p>
  
  <p><strong>3rd UPDATE:</strong> 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" and did the same for QtDeclarative and QtScript</p>
  
  <p>all errors in CMake are gone - but when compiling some headers can not be found...</p>