Skip to content

Commit 385be9f

Browse files
Integrate VisionOS platform
1 parent ff88c1d commit 385be9f

7 files changed

Lines changed: 13 additions & 9 deletions

File tree

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set(DILIGENT_TOOLS_FOUND TRUE CACHE INTERNAL "DiligentTools module is found")
88

99
file(RELATIVE_PATH DILIGENT_TOOLS_DIR "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
1010

11-
if(PLATFORM_WIN32 OR PLATFORM_UNIVERSAL_WINDOWS OR PLATFORM_LINUX OR PLATFORM_MACOS OR PLATFORM_IOS OR PLATFORM_TVOS OR PLATFORM_WEB)
11+
if(PLATFORM_WIN32 OR PLATFORM_UNIVERSAL_WINDOWS OR PLATFORM_LINUX OR PLATFORM_MACOS OR PLATFORM_IOS OR PLATFORM_TVOS OR PLATFORM_VISIONOS OR PLATFORM_WEB)
1212
option(DILIGENT_INSTALL_TOOLS "Install DiligentTool module headers and libraries" ON)
1313
else()
1414
set(DILIGENT_INSTALL_TOOLS OFF)
@@ -50,7 +50,11 @@ add_subdirectory(ThirdParty)
5050
add_subdirectory(TextureLoader)
5151
add_subdirectory(AssetLoader)
5252
add_subdirectory(Imgui)
53-
add_subdirectory(NativeApp)
53+
if(NOT PLATFORM_VISIONOS)
54+
# visionOS samples (Tutorial30_HelloVisionOS) ship their own UIKit scene
55+
# delegates and entry point; NativeAppBase has no visionOS implementation.
56+
add_subdirectory(NativeApp)
57+
endif()
5458

5559
if((PLATFORM_WIN32 OR PLATFORM_LINUX OR PLATFORM_MACOS) AND GL_SUPPORTED)
5660
add_subdirectory(HLSL2GLSLConverter)

NativeApp/include/NativeAppBase.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2022 Diligent Graphics LLC
2+
* Copyright 2019-2026 Diligent Graphics LLC
33
* Copyright 2015-2019 Egor Yusov
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");

ThirdParty/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ if (NOT TARGET PNG::PNG)
4242
set(PNG_TESTS OFF CACHE BOOL "Build libpng tests")
4343
set(SKIP_INSTALL_ALL ON)
4444
set(PNG_FRAMEWORK OFF)
45-
if(PLATFORM_TVOS)
46-
# libpng does not support tvOS, but it does support iOS, so we can use the iOS target
45+
if(PLATFORM_TVOS OR PLATFORM_VISIONOS)
46+
# libpng does not support tvOS/visionOS, but it does support iOS, so we can use the iOS target
4747
set(IOS TRUE)
4848
endif()
4949
add_subdirectory(libpng)

ThirdParty/libtiff/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ set(SOURCE
4747

4848
if(PLATFORM_WIN32)
4949
list(APPEND SOURCE tif_win32.c)
50-
elseif(PLATFORM_ANDROID OR PLATFORM_UNIVERSAL_WINDOWS OR PLATFORM_LINUX OR PLATFORM_MACOS OR PLATFORM_IOS OR PLATFORM_TVOS OR PLATFORM_WEB)
50+
elseif(PLATFORM_ANDROID OR PLATFORM_UNIVERSAL_WINDOWS OR PLATFORM_LINUX OR PLATFORM_MACOS OR PLATFORM_IOS OR PLATFORM_TVOS OR PLATFORM_VISIONOS OR PLATFORM_WEB)
5151
list(APPEND SOURCE tif_unix.c)
5252
else()
5353
message(FATAL_ERROR "Unknown platform")

ThirdParty/libtiff/tif_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# include "tif_config.android.h"
1212

13-
#elif PLATFORM_LINUX || PLATFORM_MACOS || PLATFORM_IOS || PLATFORM_TVOS || PLATFORM_WEB
13+
#elif PLATFORM_LINUX || PLATFORM_MACOS || PLATFORM_IOS || PLATFORM_TVOS || PLATFORM_VISIONOS || PLATFORM_WEB
1414

1515
# include "tif_config.linux.h"
1616

ThirdParty/libtiff/tiffconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# include "tiffconf.linux.h"
77
# endif
88

9-
#elif PLATFORM_ANDROID || PLATFORM_LINUX || PLATFORM_MACOS || PLATFORM_IOS || PLATFORM_TVOS || PLATFORM_WEB
9+
#elif PLATFORM_ANDROID || PLATFORM_LINUX || PLATFORM_MACOS || PLATFORM_IOS || PLATFORM_TVOS || PLATFORM_VISIONOS || PLATFORM_WEB
1010

1111
# include "tiffconf.linux.h"
1212

ThirdParty/zlib.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ set_common_target_properties(ZLib)
4444
# Using target_compile_options() adds it before options of the linked libraries.
4545
target_link_libraries(ZLib PRIVATE Diligent-BuildSettings NO_WERROR)
4646

47-
if(PLATFORM_LINUX OR PLATFORM_ANDROID OR PLATFORM_MACOS OR PLATFORM_IOS OR PLATFORM_TVOS OR PLATFORM_WEB)
47+
if(PLATFORM_LINUX OR PLATFORM_ANDROID OR PLATFORM_MACOS OR PLATFORM_IOS OR PLATFORM_TVOS OR PLATFORM_VISIONOS OR PLATFORM_WEB)
4848
target_compile_definitions(ZLib PRIVATE HAVE_UNISTD_H)
4949
endif()
5050

0 commit comments

Comments
 (0)