Merge pull request #28 from 2-3-5-41/main
Make `openxr` features platform agnostic to fix `CMake error: ...` common issue.
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: "Cache"
|
- name: "Cache"
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
- name: "External dependencies"
|
- name: "External dependencies"
|
||||||
run: sudo apt-get install -y libasound2-dev portaudio19-dev build-essential libpulse-dev libdbus-1-dev libudev-dev
|
run: sudo apt-get install -y libasound2-dev portaudio19-dev build-essential libpulse-dev libdbus-1-dev libudev-dev libopenxr-loader1 libopenxr-dev
|
||||||
- name: "Checks"
|
- name: "Checks"
|
||||||
run: |
|
run: |
|
||||||
cargo update
|
cargo update
|
||||||
|
|||||||
11
Cargo.toml
11
Cargo.toml
@@ -4,19 +4,24 @@ version = "0.1.0"
|
|||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["linked"]
|
default = ["openxr/mint", "linked"]
|
||||||
linked = ["openxr/linked", "openxr/static"]
|
linked = ["openxr/linked"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0.75"
|
anyhow = "1.0.75"
|
||||||
ash = "0.37.3"
|
ash = "0.37.3"
|
||||||
bevy = "0.12"
|
bevy = "0.12"
|
||||||
openxr = { version = "0.17.1", features = ["mint"] }
|
|
||||||
mint = "0.5.9"
|
mint = "0.5.9"
|
||||||
wgpu = "0.17.1"
|
wgpu = "0.17.1"
|
||||||
wgpu-core = { version = "0.17.1", features = ["vulkan"] }
|
wgpu-core = { version = "0.17.1", features = ["vulkan"] }
|
||||||
wgpu-hal = "0.17.1"
|
wgpu-hal = "0.17.1"
|
||||||
|
|
||||||
|
[target.'cfg( target_family = "unix" )'.dependencies]
|
||||||
|
openxr = "0.17.1"
|
||||||
|
|
||||||
|
[target.'cfg(not(target_family = "unix"))'.dependencies]
|
||||||
|
openxr = { version = "0.17.1", features = ["static"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bevy = "0.12"
|
bevy = "0.12"
|
||||||
color-eyre = "0.6.2"
|
color-eyre = "0.6.2"
|
||||||
|
|||||||
@@ -4,3 +4,9 @@ An in-progress crate for adding openxr support to Bevy without forking.
|
|||||||

|

|
||||||
|
|
||||||
To see it in action run the example in `examples` with `cargo run --example xr`
|
To see it in action run the example in `examples` with `cargo run --example xr`
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
- Make sure, if you're on Linux, that you have the `openxr` package installed on your system.
|
||||||
|
- I'm getting poor performance.
|
||||||
|
- Like other bevy projects, make sure you're building in release (example: `cargo run --example xr --release`)
|
||||||
|
|||||||
Reference in New Issue
Block a user