Skip to content

Commit

Permalink
Fix android ci build (cmake find_path issue), fix build badges in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
1runeberg committed Jul 10, 2024
1 parent d401d38 commit cba7ef4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,17 @@ target_include_directories(${XRLIB} PUBLIC "${XRLIB_SRC}"
)
# For Android, add the native app glue NDK directory
if(ANDROID)
message(STATUS "[${XRLIB}] Android NDK path: ${ANDROID_NDK}")

# Add native app glue
find_path(ANDROID_NATIVE_APP_GLUE NAMES android_native_app_glue.h PATHS ${ANDROID_NDK}/sources/android/native_app_glue)
find_path(ANDROID_NATIVE_APP_GLUE NAMES android_native_app_glue.h PATHS "${ANDROID_NDK}/sources/android/native_app_glue" NO_DEFAULT_PATH)

if(NOT ANDROID_NATIVE_APP_GLUE)
message(FATAL_ERROR "[${XRLIB}] ERROR: Unable to find native_app_glue in: ${ANDROID_APP_GLUE}")
message(WARNING "[${XRLIB}] WARNING: Unable to find native_app_glue in: **${ANDROID_NDK}/sources/android/native_app_glue** setting manually.")
set(ANDROID_NATIVE_APP_GLUE "${ANDROID_NDK}/sources/android/native_app_glue")
endif()

target_include_directories(${XRLIB} PUBLIC ${ANDROID_NATIVE_APP_GLUE})
target_compile_definitions(${XRLIB} PRIVATE XR_USE_PLATFORM_ANDROID=1)
endif()

message(STATUS "[${XRLIB}] Public include directories defined.")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# xrlib
[![Desktop builds [ Linux|Windows, Debug|Release, g++|clang++|cl ](https://github.com/1runeberg/xrlib/actions/workflows/desktop_builds.yml/badge.svg)](https://github.com/1runeberg/xrlib/actions/workflows/desktop_builds.yml) [![Android builds [ arm64-v8a, Debug|Release ](https://github.com/1runeberg/xrlib/actions/workflows/android_builds.yml/badge.svg)](https://github.com/1runeberg/xrlib/actions/workflows/android_builds.yml)
[![Desktop builds [ Linux|Windows, Debug|Release, g++|clang++|cl ]](https://github.com/1runeberg/xrlib/actions/workflows/desktop_builds.yml/badge.svg)](https://github.com/1runeberg/xrlib/actions/workflows/desktop_builds.yml)   [![Android builds [ arm64-v8a, Debug|Release ]](https://github.com/1runeberg/xrlib/actions/workflows/android_builds.yml/badge.svg)](https://github.com/1runeberg/xrlib/actions/workflows/android_builds.yml)

C++20 OpenXR wrapper library designed to abstract the complexities of the OpenXR API while retaining its flexibility, allowing developers to focus on creating immersive experiences without getting bogged down by low-level details. The library is Vulkan-native and includes an optional PBR renderer, designed from the ground up with mixed reality in mind.

Expand Down

0 comments on commit cba7ef4

Please sign in to comment.