diff --git a/Cargo.toml b/Cargo.toml index 71c036a..bab6369 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,19 +4,23 @@ version = "0.1.0" edition = "2021" [features] -default = ["linked"] -linked = ["openxr/linked", "openxr/static"] +default = ["openxr/mint"] [dependencies] anyhow = "1.0.75" ash = "0.37.3" bevy = "0.12" -openxr = { version = "0.17.1", features = ["mint"] } mint = "0.5.9" wgpu = "0.17.1" wgpu-core = { version = "0.17.1", features = ["vulkan"] } wgpu-hal = "0.17.1" +[target.'cfg( target_os = "linux" )'.dependencies] +openxr = { version = "0.17.1", features = ["linked"] } + +[target.'cfg(not(target_os = "linux"))'.dependencies] +openxr = { version = "0.17.1", features = ["linked", "static"] } + [dev-dependencies] bevy = "0.12" color-eyre = "0.6.2" diff --git a/README.md b/README.md index a0c7eb2..94cb820 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,11 @@ An in-progress crate for adding openxr support to Bevy without forking. ![image](https://github.com/awtterpip/bevy_openxr/assets/50841145/aa01fde4-7915-49b9-b486-ff61ce6d57a9) To see it in action run the example in `examples` with `cargo run --example xr` + +## Troubleshooting + +- I'm getting a `CMake error: ...` on Linux. + - Make sure you have the `openxr` package installed on your system. + - Append `--no-default-features` to your build command (example: `cargo run --example xr --no-default-features`) +- I'm getting poor performance. + - Like other bevy projects, make sure you're building in release (example: `cargo run --example xr --release`)