Hi,

We're using CMake in a project that depends upon a custom-built Qt
version configured using -no-xmlpatterns.

We are currently using 2.8.10.2 without problems, but, because I
wanted to try the ninja support improvements, I downloaded the latest
nightly build for windows and gave it a run on our project.
Unfortunately, it seems that our tree is about to be broken by the
next CMake release. Since I found why, I thought I could as well share
it here.

diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 078c031..a02550f 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -1051,8 +1051,10 @@ if (QT_QMAKE_EXECUTABLE AND QTVERSION)
   _qt4_add_target_private_depends(QtHelp Sql Xml Network)
   _qt4_add_target_private_depends(QtXmlPatterns Network)
   _qt4_add_target_private_depends(QtScriptTools Gui)
+  if(QT_QTXMLPATTERNS_FOUND)
   _qt4_add_target_private_depends(QtWebKit XmlPatterns)
   _qt4_add_target_private_depends(QtDeclarative XmlPatterns Svg Sql Gui)
+  endif()
   _qt4_add_target_private_depends(QtMultimedia Gui)
   _qt4_add_target_private_depends(QtOpenGL Gui)
   _qt4_add_target_private_depends(QAxServer Gui)

Hope that helps!

Cheers,
Nicolas
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to