From 64847af6e6cf953626f673eeaced4bcb0b919c88 Mon Sep 17 00:00:00 2001 From: Janne Juntunen Date: Mon, 21 Mar 2022 15:29:27 +0200 Subject: [PATCH] QtPlatformSupport: add support for detecting webOS Some autotest CMakeLists.txts need to know whether the target is webOS. This change enables that. Task-number: QTBUG-101933 Pick-to: 6.3 Change-Id: I7b4ebe89622a4ad8bc313e807d9fa50152c96d14 Reviewed-by: Alexandru Croitor --- cmake/QtPlatformSupport.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/QtPlatformSupport.cmake b/cmake/QtPlatformSupport.cmake index a10e7226eb9..22c6b9e0565 100644 --- a/cmake/QtPlatformSupport.cmake +++ b/cmake/QtPlatformSupport.cmake @@ -20,6 +20,10 @@ qt_set01(WASM CMAKE_SYSTEM_NAME STREQUAL "Emscripten" OR EMSCRIPTEN) qt_set01(SOLARIS CMAKE_SYSTEM_NAME STREQUAL "SunOS") qt_set01(HURD CMAKE_SYSTEM_NAME STREQUAL "GNU") +# This is the only reliable way we can determine the webOS platform as the yocto recipe adds this +# compile definition into its generated toolchain.cmake file +qt_set01(WEBOS CMAKE_CXX_FLAGS MATCHES "-D__WEBOS__") + qt_set01(BSD APPLE OR OPENBSD OR FREEBSD OR NETBSD) qt_set01(IOS APPLE AND CMAKE_SYSTEM_NAME STREQUAL "iOS")