Skip to content

Commit

Permalink
feat: Added Apple Vision OS binary
Browse files Browse the repository at this point in the history
- fix: visionOS requires a static lib
  • Loading branch information
atteneder committed Jan 19, 2024
1 parent a5e5003 commit 0aa589c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/unity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,41 @@ jobs:
name: draco_apple
path: draco_apple

mac-beta:

runs-on: macos-13

steps:
- uses: actions/checkout@v3

- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.2.0'

- name: Configure visionOS
run: >
cmake . -G Xcode -B build_visionos
-DCMAKE_BUILD_TYPE=MinSizeRel
-DCMAKE_SYSTEM_NAME=visionOS
-DDRACO_UNITY_PLUGIN=ON
-DDRACO_GLTF_BITSTREAM=ON
-DDRACO_BACKWARDS_COMPATIBILITY=OFF
- name: Build visionOS Device
run: cmake --build build_visionos --config MinSizeRel --target draco_unity -- CODE_SIGN_IDENTITY= CODE_SIGN_ENTITLEMENT= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
- name: Build visionOS Simulator
run: cmake --build build_visionos --config MinSizeRel --target draco_unity -- -sdk xrsimulator

- name: Package Apple
run: |
mkdir -p draco_apple_beta/visionOS/Device
mkdir -p draco_apple_beta/visionOS/Simulator
mv build_visionos/MinSizeRel-xros/libdraco_unity.a draco_apple_beta/visionOS/Device
mv build_visionos/MinSizeRel-xrsimulator/libdraco_unity.a draco_apple_beta/visionOS/Simulator
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: draco_apple_beta
path: draco_apple_beta

windows:

Expand Down Expand Up @@ -445,6 +480,7 @@ jobs:
runs-on: ubuntu-22.04
needs:
- mac
- mac-beta
- windows
- linux
- linux_legacy
Expand All @@ -461,6 +497,7 @@ jobs:
run: |
mkdir draco
cp -r artifacts/draco_apple/* draco
cp -r artifacts/draco_apple_beta/* draco
cp -r artifacts/draco_win/* draco
cp -r artifacts/draco_linux/* draco
cp -r artifacts/draco_linux_legacy/* draco
Expand All @@ -483,6 +520,7 @@ jobs:
with:
name: |
draco_apple
draco_apple_beta
draco_win
draco_linux
draco_linux_legacy
Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1053,10 +1053,8 @@ else()
endif()

if(DRACO_UNITY_PLUGIN)
if(IOS OR EMSCRIPTEN OR CMAKE_SYSTEM_NAME STREQUAL "tvOS")
if(IOS OR EMSCRIPTEN OR CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAKE_SYSTEM_NAME STREQUAL "visionOS")
set(unity_decoder_lib_type STATIC)
elseif(CMAKE_SYSTEM_NAME STREQUAL "visionOS")
set(unity_decoder_lib_type SHARED)
else()
set(unity_decoder_lib_type MODULE)
endif()
Expand Down

0 comments on commit 0aa589c

Please sign in to comment.