<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="http://git.reviewboard.kde.org/r/112151/">http://git.reviewboard.kde.org/r/112151/</a>
     </td>
    </tr>
   </table>
   <br />













<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On September 4th, 2013, 9:26 a.m. CEST, <b>Stephen Kelly</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Here's a diff fixing the issues:

diff --git a/find-modules/FindXCB.cmake b/find-modules/FindXCB.cmake
index 2684ed0..823d167 100644
--- a/find-modules/FindXCB.cmake
+++ b/find-modules/FindXCB.cmake
@@ -60,9 +60,15 @@ unset(unknownComponents)
 set(pkgConfigModules)
 set(requiredComponents)
 
+if (XCB_FIND_COMPONENTS)
+  set(comps ${XCB_FIND_COMPONENTS})
+else()
+  set(comps ${knownComponents})
+endif()
+
 # iterate through the list of requested components, and check that we know them all.
 # If not, fail.
-foreach(comp ${XCB_FIND_COMPONENTS})
+foreach(comp ${comps})
     list(FIND knownComponents ${comp} index )
     if("${index}" STREQUAL "-1")
         list(APPEND unknownComponents "${comp}")
@@ -183,16 +189,17 @@ macro(_XCB_HANDLE_COMPONENT _comp)
         set(_lib "xcb-xv")
     endif()
 
-    find_path(XCB_${_comp}_INCLUDE_DIR NAMES xcb/${header} HINTS ${PKG_XCB_INCLUDE_DIRS})
+    find_path(XCB_${_comp}_INCLUDE_DIR NAMES ${_header} HINTS ${PKG_XCB_INCLUDE_DIRS})
     find_library(XCB_${_comp}_LIBRARY NAMES ${_lib} HINTS ${PKG_XCB_LIBRARY_DIRS})
 
-    if(NOT XCB_FIND_QUIETLY)
-        message(STATUS "XCB[${_comp}]: Found component ${_comp}")
+    if(XCB_${_comp}_INCLUDE_DIR AND XCB_${_comp}_LIBRARY)
+        list(APPEND XCB_INCLUDE_DIRS ${XCB_${_comp}_INCLUDE_DIR})
+        list(APPEND XCB_LIBRARIES ${XCB_${_comp}_LIBRARY})
+        if (NOT XCB_FIND_QUIETLY)
+            message(STATUS "XCB[${_comp}]: Found component ${_comp}")
+        endif()
     endif()
 
-    list(APPEND XCB_INCLUDE_DIRS ${XCB_${_comp}_INCLUDE_DIR})
-    list(APPEND XCB_LIBRARIES ${XCB_${_comp}_LIBRARY})
-
     if(XCB_FIND_REQUIRED_${_comp})
         list(APPEND requiredComponents XCB_${_comp}_FOUND)
     endif()
@@ -210,16 +217,18 @@ IF (NOT WIN32)
     include(FindPackageHandleStandardArgs)
     # Use pkg-config to get the directories and then use these values
     # in the FIND_PATH() and FIND_LIBRARY() calls
-    FIND_PACKAGE(PkgConfig)
-    PKG_CHECK_MODULES(PKG_XCB QUIET ${pkgConfigModules})
+    find_package(PkgConfig)
+    pkg_check_modules(PKG_XCB QUIET ${pkgConfigModules})
 
-    SET(XCB_DEFINITIONS ${PKG_XCB_CFLAGS})
+    set(XCB_DEFINITIONS ${PKG_XCB_CFLAGS})
 
-    foreach(comp ${XCB_FIND_COMPONENTS})
+    foreach(comp ${comps})
         _xcb_handle_component(${comp})
     endforeach()
 
-    list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS)
+    if(XCB_INCLUDE_DIRS)
+        list(REMOVE_DUPLICATES XCB_INCLUDE_DIRS)
+    endif()
 
     find_package_handle_standard_args(XCB DEFAULT_MSG XCB_LIBRARIES XCB_INCLUDE_DIRS ${requiredComponents})
 
</pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">thanks a lot for the patch.</pre>
<br />


<p>- Martin</p>


<br />
<p>On September 4th, 2013, 6:57 a.m. CEST, Martin Gräßlin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for KDE Frameworks, Alexander Neundorf and Stephen Kelly.</div>
<div>By Martin Gräßlin.</div>


<p style="color: grey;"><i>Updated Sept. 4, 2013, 6:57 a.m.</i></p>






<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Instead of finding all or nothing from XCB it becomes components aware. So a user can just specify which XCB components it needs and compilation doesn't fail if a not-needed unrelated component is not found. It also allows to have some components as required and some as optional.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">tested in kde-workspace</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>find-modules/FindXCB.cmake <span style="color: grey">(7e7e701)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/112151/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>