Skip to content

Commit

Permalink
add macOS define (#323)
Browse files Browse the repository at this point in the history
* add macOS define

This fixes building the loader on macOS.

With this commit I am able to build the loader on macOS as part of the [openxr
rust crate](https://github.com/Ralith/openxrs). I have a fork of
[hotham-simulator](https://github.com/leetvr/hotham/wiki/Adding-the-Hotham-Simulator-to-your-development-environment)
working locally, allowing complete (albeit basic) openXR development locally on
my macbook.

* add change fragment
  • Loading branch information
kcking authored Aug 5, 2022
1 parent 6d572b7 commit 98f804e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changes/sdk/pr.323.gh.OpenXR-SDK-Source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Loader: add -DXR_OS_APPLE define on macOS (fixes compilation on macOS)
2 changes: 2 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
add_definitions(-DXR_OS_LINUX)
elseif(ANDROID)
add_definitions(-DXR_OS_ANDROID)
elseif(APPLE)
add_definitions(-DXR_OS_APPLE)
endif()

# /EHsc (support for C++ exceptions) is default in most configurations but seems missing when building arm/arm64.
Expand Down

0 comments on commit 98f804e

Please sign in to comment.