[CMake] QT4 Module Patch Request

Nicolas Tisserand nt at manctl.com
Tue Feb 26 14:15:58 EST 2013


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


More information about the CMake mailing list