From d5bf42f75b0ae35b7f02bb9211787ae1d44a98ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 18 Mar 2024 19:35:52 +0100 Subject: Add preliminary support for Qt for visionOS Qt already runs on Vision Pro as "Designed for iPad", using Qt for iOS. This change enables building Qt for visionOS directly, which opens the door to visionOS specific APIs and use-cases such as volumes and immersive spaces. The platform removes some APIs we depend on, notably UIScreen, so some code paths have been disabled or mocked to get something up and running. As our current window management approach on UIKit platforms depends on UIWindow and UIScreen there is currently no way to bring up QWindows. This will improve once we refactor our window management to use window scenes. To configure for visionOS, pass -platform macx-visionos-clang, and optionally add -sdk xrsimulator to build for the simulator. Change-Id: I4eda55fc3fd06e12d30a188928487cf68940ee07 Reviewed-by: Alexey Edelev --- src/entrypoint/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/entrypoint/CMakeLists.txt') diff --git a/src/entrypoint/CMakeLists.txt b/src/entrypoint/CMakeLists.txt index 21385eaba0..ba8342e41a 100644 --- a/src/entrypoint/CMakeLists.txt +++ b/src/entrypoint/CMakeLists.txt @@ -1,7 +1,7 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -if (NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS") +if (NOT (WIN32 OR UIKIT)) return() endif() @@ -111,7 +111,7 @@ if(WIN32) qt_internal_add_sync_header_dependencies(EntryPointImplementation Core) endif() -if(CMAKE_SYSTEM_NAME STREQUAL "iOS") +if(UIKIT) set_target_properties(EntryPointPrivate PROPERTIES INTERFACE_LINK_OPTIONS "-Wl,-e,_qt_main_wrapper" ) -- cgit v1.2.3