Skip to content

Commit

Permalink
[OpenXR] Use includes from Maven package (#1552)
Browse files Browse the repository at this point in the history
We've recently improved our build process by getting the OpenXR
library from Maven. That allowed us to, among other things,
use the already compiled khronos loader instead of the propietary
ones.

However we could do even better by also using the maven package
even for those configurations that require a propietary loader.
In this case we would use it to get the OpenXR include files.

This will allow us to remove the OpenXR-SDK submodule from the
third parties repo as it won't be no longer needed.
  • Loading branch information
svillar authored Oct 3, 2024
1 parent 92294a3 commit 805521f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ This repo is only available to Igalia members. If you have access to the relevan
- `third_party/wavesdk/` for Vive (should contain a `build` folder, among other things)
- `third_party/picoxr` [Pico OpenXR Mobile SDK](https://developer-global.pico-interactive.com/sdk?deviceId=1&platformId=3&itemId=11) (should contain `libs` folders, among other things that are not necessary for Wolvic)
- `third_party/spaces` [for Snapdragon Spaces](https://spaces.qualcomm.com/)(should contain `libopenxr_loader.aar`)
- `third_party/OpenXR-SDK/` [OpenXR-SDK](https://github.com/KhronosGroup/OpenXR-SDK) (should contain an `include` folder). This is used by HVR and PicoXR flavours. The other flavours using OpenXR use the include files provided by the Khronos OpenXR loader AAR from Maven.
- `third_party/aliceimu/` for [Huawei Vision Glass](https://consumer.huawei.com/cn/wearables/vision-glass/) (should contain an `.aar` file with the IMU library for the glasses)

The [repo in `third_party`](https://github.com/Igalia/wolvic-third-parties) can be updated like so:
Expand Down
3 changes: 1 addition & 2 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,15 @@ endif()
if(OPENXR)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXR_USE_PLATFORM_ANDROID -DXR_USE_GRAPHICS_API_OPENGL_ES")
find_package(OpenXR REQUIRED CONFIG)
target_link_libraries(native-lib PRIVATE OpenXR::headers)
include_directories(${CMAKE_SOURCE_DIR}/../app/src/openxr/cpp)
if (HVR)
include_directories(${CMAKE_SOURCE_DIR}/../third_party/OpenXR-SDK/include)
add_custom_command(TARGET native-lib POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/../third_party/hvr/${ANDROID_ABI}/libxr_loader.so
${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libxr_loader.so
)
elseif (PICOXR)
include_directories(${CMAKE_SOURCE_DIR}/../third_party/OpenXR-SDK/include)
add_custom_command(TARGET native-lib POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/../third_party/picoxr/libs/android.${ANDROID_ABI}/libopenxr_loader.so
Expand Down
2 changes: 1 addition & 1 deletion third_party_hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
59b25b09e0084897dd81675d14e9f47177d52359
7da99cb21263d74d5bf3d56d210ee85fdbd6d57e

0 comments on commit 805521f

Please sign in to comment.