mirror of
https://github.com/thejerf/baijiSteamVR.git
synced 2026-10-17 23:01:32 +02:00
Keep Externals/OpenXR pinned to Khronos' upstream 1.1.63 commit instead of carrying local source edits as an unreachable submodule commit. Record the three Frame loader compatibility changes in the parent tree as OpenXR-Loader-Exceptions.patch. When ENABLE_VR is configured, copy the pinned SDK into the binary tree, apply the patch to that copy, and build the loader from there. This leaves the checked-out submodule clean and supports read-only source mounts in container builds. CMake verifies the patch applies to the expected SDK files before adding the patched copy to the build.
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index b26bbcc..f687560 100644
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -166 +166 @@ option(
|
|
- ON
|
|
+ OFF
|
|
@@ -167,0 +168,4 @@ option(
|
|
+if(NOT BUILD_LOADER_WITH_EXCEPTION_HANDLING)
|
|
+ add_definitions(-DXRLOADER_DISABLE_EXCEPTION_HANDLING)
|
|
+ add_definitions(-DJSON_USE_EXCEPTIONS=0)
|
|
+endif()
|
|
diff --git a/src/loader/CMakeLists.txt b/src/loader/CMakeLists.txt
|
|
index fead046..9db503f 100644
|
|
--- a/src/loader/CMakeLists.txt
|
|
+++ b/src/loader/CMakeLists.txt
|
|
@@ -157,0 +158,5 @@ endif()
|
|
+# Parent project (Dolphin) builds with -fno-exceptions, but a few loader
|
|
+# destructors still contain unconditional catch(...) blocks. Re-enable
|
|
+# exceptions for this target only so those compile.
|
|
+target_compile_options(openxr_loader PRIVATE -fexceptions)
|
|
+
|
|
diff --git a/src/loader/api_layer_interface.cpp b/src/loader/api_layer_interface.cpp
|
|
index b8f0881..90f5a31 100644
|
|
--- a/src/loader/api_layer_interface.cpp
|
|
+++ b/src/loader/api_layer_interface.cpp
|
|
@@ -455,0 +456 @@ ApiLayerInterface::~ApiLayerInterface() {
|
|
+#ifndef XRLOADER_DISABLE_EXCEPTION_HANDLING
|
|
@@ -456,0 +458 @@ ApiLayerInterface::~ApiLayerInterface() {
|
|
+#endif
|
|
@@ -459,0 +462 @@ ApiLayerInterface::~ApiLayerInterface() {
|
|
+#ifndef XRLOADER_DISABLE_EXCEPTION_HANDLING
|
|
@@ -465,0 +469 @@ ApiLayerInterface::~ApiLayerInterface() {
|
|
+#endif
|