diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch')
-rw-r--r-- | import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch new file mode 100644 index 000000000..80fc277fa --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-devtools/cmake/cmake/qt4-fail-silent.patch @@ -0,0 +1,77 @@ +Fail silently if system Qt installation is broken + +Fixes a regression in behaviour from 2.8.10 to 2.8.11 resulting in the +following error if the system Qt installation is broken: + +CMake Error at Modules/FindQt4.cmake:1028 (set_property): + set_property could not find TARGET Qt4::QtCore. Perhaps it has not yet + been created. +Call Stack (most recent call first): + Tests/RunCMake/CMakeLists.txt:79 (find_package) + +Upstream-Status: Pending + +Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> + +The patch was slightly adapted in order to match cmake 3.2.2: +Another set_property was introduced which had to be included +within the if(QT_QTCORE_FOUND) statement. + +Signed-off-by: Moritz Blume <moritz.blume@bmw-carit.de> +--- + Modules/FindQt4.cmake | 39 ++++++++++++++++++++------------------- + 1 file changed, 20 insertions(+), 19 deletions(-) + +diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake +index 6704769..9048e35 100644 +--- a/Modules/FindQt4.cmake ++++ b/Modules/FindQt4.cmake +@@ -1000,25 +1000,26 @@ if (QT_QMAKE_EXECUTABLE AND + endif() + endmacro() + +- +- # Set QT_xyz_LIBRARY variable and add +- # library include path to QT_INCLUDES +- _QT4_ADJUST_LIB_VARS(QtCore) +- set_property(TARGET Qt4::QtCore APPEND PROPERTY +- INTERFACE_INCLUDE_DIRECTORIES +- "${QT_MKSPECS_DIR}/default" +- ${QT_INCLUDE_DIR} +- ) +- set_property(TARGET Qt4::QtCore APPEND PROPERTY +- INTERFACE_COMPILE_DEFINITIONS +- $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG> +- ) +- set_property(TARGET Qt4::QtCore PROPERTY +- INTERFACE_QT_MAJOR_VERSION 4 +- ) +- set_property(TARGET Qt4::QtCore APPEND PROPERTY +- COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION +- ) ++ if(QT_QTCORE_FOUND) ++ # Set QT_xyz_LIBRARY variable and add ++ # library include path to QT_INCLUDES ++ _QT4_ADJUST_LIB_VARS(QtCore) ++ set_property(TARGET Qt4::QtCore APPEND PROPERTY ++ INTERFACE_INCLUDE_DIRECTORIES ++ "${QT_MKSPECS_DIR}/default" ++ ${QT_INCLUDE_DIR} ++ ) ++ set_property(TARGET Qt4::QtCore APPEND PROPERTY ++ INTERFACE_COMPILE_DEFINITIONS ++ $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG> ++ ) ++ set_property(TARGET Qt4::QtCore PROPERTY ++ INTERFACE_QT_MAJOR_VERSION 4 ++ ) ++ set_property(TARGET Qt4::QtCore APPEND PROPERTY ++ COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION ++ ) ++ endif() + + foreach(QT_MODULE ${QT_MODULES}) + _QT4_ADJUST_LIB_VARS(${QT_MODULE}) +-- +1.9.1 + |