From a64fd0e22ce5beb8f79e615e24c03b4a05a2fd8a Mon Sep 17 00:00:00 2001
From: Piotr Tworek <tworaz@tworaz.net>
Date: Sat, 20 May 2017 13:58:23 +0200
Subject: [PATCH] Extend upstream workaround for bug 371721 to also cover OE Qt
 5.8.

Since Qt 5.8 provided by meta-qt5 contains a few additional patches we
need to make sure that the workaround for bug 371721 is also enabled
there. Otherwise kio will fail to build on 32bit arm and x86 platforms.

Signed-off-by: Piotr Tworek <tworaz@tworaz.net>
---
 autotests/CMakeLists.txt | 2 +-
 src/core/CMakeLists.txt  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index 83b7b73..46eabba 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -125,6 +125,6 @@ ecm_add_tests(
 endif()
 
 # this should be done by cmake, see bug 371721
-if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND Qt5Core_VERSION VERSION_GREATER 5.8.0)
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND Qt5Core_VERSION VERSION_GREATER_EQUAL 5.8.0)
     set_property(TARGET jobtest APPEND PROPERTY AUTOMOC_MOC_OPTIONS --include ${CMAKE_BINARY_DIR}/src/core/moc_predefs.h)
 endif()
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index f324ba0..1220c6e 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -161,7 +161,7 @@ set_target_properties(KF5KIOCore PROPERTIES VERSION ${KIO_VERSION_STRING}
 )
 
 # this should be done by cmake, see bug 371721
-if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND Qt5Core_VERSION VERSION_GREATER 5.8.0)
+if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND Qt5Core_VERSION VERSION_GREATER_EQUAL 5.8.0)
     add_custom_command(
         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h
         COMMAND "${CMAKE_CXX_COMPILER}" "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp" > ${CMAKE_CURRENT_BINARY_DIR}/moc_predefs.h
-- 
2.13.0

