You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
OpenXR add core support for Khronos loader
This commit is contained in:
@@ -203,6 +203,8 @@ dependencies {
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.2.1"
|
||||
implementation "org.bouncycastle:bcprov-jdk15to18:1.78"
|
||||
|
||||
implementation "org.khronos.openxr:openxr_loader_for_android:$versions.openxrLoaderVersion"
|
||||
|
||||
// Android XR dependencies
|
||||
androidImplementation "org.godotengine:godot-openxr-vendors-androidxr:$versions.openxrVendorsVersion"
|
||||
// Meta dependencies
|
||||
@@ -217,3 +219,26 @@ dependencies {
|
||||
androidTestImplementation "androidx.test:runner:$versions.testRunnerVersion"
|
||||
androidTestUtil "androidx.test:orchestrator:$versions.testOrchestratorVersion"
|
||||
}
|
||||
|
||||
/*
|
||||
* Older versions of our vendor plugin include a loader that we no longer need.
|
||||
* This code ensures those are removed.
|
||||
*/
|
||||
tasks.withType( com.android.build.gradle.internal.tasks.MergeNativeLibsTask) {
|
||||
doFirst {
|
||||
externalLibNativeLibs.each { jniDir ->
|
||||
if (jniDir.getCanonicalPath().contains("godot-openxr-") || jniDir.getCanonicalPath().contains("godotopenxr")) {
|
||||
// Delete the 'libopenxr_loader.so' files from the vendors plugin so we only use the version from the
|
||||
// openxr loader dependency.
|
||||
File armFile = new File(jniDir, "arm64-v8a/libopenxr_loader.so")
|
||||
if (armFile.exists()) {
|
||||
armFile.delete()
|
||||
}
|
||||
File x86File = new File(jniDir, "x86_64/libopenxr_loader.so")
|
||||
if (x86File.exists()) {
|
||||
x86File.delete()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user