From 805521fd7703908a4e142a4f31ac811aafbb2723 Mon Sep 17 00:00:00 2001 From: Sergio Date: Thu, 3 Oct 2024 09:57:45 +0200 Subject: [PATCH] [OpenXR] Use includes from Maven package (#1552) 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. --- README.md | 1 - app/CMakeLists.txt | 3 +-- third_party_hash | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 30683de94e..577ba8984c 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt index a3e3542082..c5d126736d 100644 --- a/app/CMakeLists.txt +++ b/app/CMakeLists.txt @@ -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 diff --git a/third_party_hash b/third_party_hash index 9611c7829c..edd6192eff 100644 --- a/third_party_hash +++ b/third_party_hash @@ -1 +1 @@ -59b25b09e0084897dd81675d14e9f47177d52359 +7da99cb21263d74d5bf3d56d210ee85fdbd6d57e