[Kde-pim] Build failed in Jenkins: kdepim_master #5824

Stephen Kelly steveire at gmail.com
Sun Jan 26 13:53:48 GMT 2014


This is a multi-part message in MIME format.
--------------060107010404080501060004
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 01/26/2014 02:01 PM, Christophe Giboudeaux wrote:
> This error is caused by a regression in CMake from git. I can reproduce it 
> locally if I use cmake from the 'next' branch. (3dc1163)

There is no regression in cmake. The only problem is that kde forked
FindQt4.cmake instead of wrapping it, and now you have to maintain the
result. I suggest remedying that.

Try something like the attached patch.

Thanks,

Steve.




--------------060107010404080501060004
Content-Type: text/x-patch;
 name="0001-Add-imported-targets-to-the-FindQt4-fork.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0001-Add-imported-targets-to-the-FindQt4-fork.patch"

>From 76ad6ed215fe2daac321734a92d7361f5c36b9ab Mon Sep 17 00:00:00 2001
From: Stephen Kelly <steveire at gmail.com>
Date: Sun, 26 Jan 2014 14:51:17 +0100
Subject: [PATCH] Add imported targets to the FindQt4 fork.

---
 cmake/modules/FindQt4.cmake | 114 ++++++++++++++------------------------------
 1 file changed, 36 insertions(+), 78 deletions(-)

diff --git a/cmake/modules/FindQt4.cmake b/cmake/modules/FindQt4.cmake
index 6db944f..ec5e25f 100644
--- a/cmake/modules/FindQt4.cmake
+++ b/cmake/modules/FindQt4.cmake
@@ -1091,85 +1091,43 @@ IF (QT4_QMAKE_FOUND)
     SET(QT_LINGUIST_EXECUTABLE NOTFOUND)
   ENDIF(QT_QMAKE_CHANGED)
   
-  FIND_PROGRAM(QT_MOC_EXECUTABLE
-    NAMES moc-qt4 moc
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_UIC_EXECUTABLE
-    NAMES uic-qt4 uic
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_UIC3_EXECUTABLE
-    NAMES uic3
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_RCC_EXECUTABLE 
-    NAMES rcc
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-if(NOT WINCE)
-  FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE 
-    NAMES qdbuscpp2xml
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE 
-    NAMES qdbusxml2cpp
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-else(NOT WINCE)
-  FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE 
-    NAMES qdbuscpp2xml
-    PATHS ${HOST_BINDIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE 
-    NAMES qdbusxml2cpp
-    PATHS ${HOST_BINDIR}
-    NO_DEFAULT_PATH
-    )
-endif(NOT WINCE)
-
-  FIND_PROGRAM(QT_LUPDATE_EXECUTABLE
-    NAMES lupdate-qt4 lupdate
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_LRELEASE_EXECUTABLE
-    NAMES lrelease-qt4 lrelease
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_QCOLLECTIONGENERATOR_EXECUTABLE
-    NAMES qcollectiongenerator-qt4 qcollectiongenerator
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
-
-  FIND_PROGRAM(QT_DESIGNER_EXECUTABLE
-    NAMES designer-qt4 designer
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
+  macro(_find_qt4_program VAR NAME)
+    find_program(${VAR}
+      NAMES ${ARGN}
+      PATHS ${QT_BINARY_DIR}
+      NO_DEFAULT_PATH
+      )
+    if (${VAR} AND NOT TARGET NAME)
+      add_executable(${NAME} IMPORTED)
+      set_property(TARGET ${NAME} PROPERTY IMPORTED_LOCATION ${${VAR}})
+    endif()
+  endmacro()
+
+  _find_qt4_program(QT_MOC_EXECUTABLE Qt4::moc moc-qt4 moc moc4)
+  _find_qt4_program(QT_UIC_EXECUTABLE Qt4::uic uic-qt4 uic uic4)
+  _find_qt4_program(QT_UIC3_EXECUTABLE Qt4::uic3 uic3)
+  _find_qt4_program(QT_RCC_EXECUTABLE Qt4::rcc rcc)
+  if(NOT WINCE)
+    _find_qt4_program(QT_DBUSCPP2XML_EXECUTABLE Qt4::qdbuscpp2xml qdbuscpp2xml)
+    _find_qt4_program(QT_DBUSXML2CPP_EXECUTABLE Qt4::qdbusxml2cpp qdbusxml2cpp)
+  else()
+    FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE
+      NAMES qdbuscpp2xml
+      PATHS ${HOST_BINDIR}
+      NO_DEFAULT_PATH
+      )
 
-  FIND_PROGRAM(QT_LINGUIST_EXECUTABLE
-    NAMES linguist-qt4 linguist
-    PATHS ${QT_BINARY_DIR}
-    NO_DEFAULT_PATH
-    )
+    FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE
+      NAMES qdbusxml2cpp
+      PATHS ${HOST_BINDIR}
+      NO_DEFAULT_PATH
+      )
+  endif()
+  _find_qt4_program(QT_LUPDATE_EXECUTABLE Qt4::lupdate lupdate-qt4 lupdate lupdate4)
+  _find_qt4_program(QT_LRELEASE_EXECUTABLE Qt4::lrelease lrelease-qt4 lrelease lrelease4)
+  _find_qt4_program(QT_QCOLLECTIONGENERATOR_EXECUTABLE Qt4::qcollectiongenerator qcollectiongenerator-qt4 qcollectiongenerator)
+  _find_qt4_program(QT_DESIGNER_EXECUTABLE Qt4::designer designer-qt4 designer designer4)
+  _find_qt4_program(QT_LINGUIST_EXECUTABLE Qt4::linguist linguist-qt4 linguist linguist4)
 
   IF (QT_MOC_EXECUTABLE)
      SET(QT_WRAP_CPP "YES")
-- 
1.8.3.2


--------------060107010404080501060004
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
--------------060107010404080501060004--



More information about the kde-pim mailing list