diff --git a/CMakeLists.txt b/CMakeLists.txt index f3d2c9d1..8e517643 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,8 @@ auto_option(WIVRN_USE_X264 "Enable x264 software encoder" AUTO) auto_option(WIVRN_USE_PIPEWIRE "Enable pipewire backend" AUTO) auto_option(WIVRN_USE_PULSEAUDIO "Enable pulseaudio backend" AUTO) +option(WIVRN_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH OFF) + option(ENABLE_COLOURED_OUTPUT "Always produce ANSI-coloured output (GNU/Clang only)." ON) if(ENABLE_COLOURED_OUTPUT) diff --git a/docs/building.md b/docs/building.md index 0a2b1efb..cd961954 100644 --- a/docs/building.md +++ b/docs/building.md @@ -29,6 +29,8 @@ It is possible to force specific encoders, by adding options -DWIVRN_USE_NVENC=ON ``` +Additionally, if your environment requires absolute paths inside the OpenXR runtime manifest, you can add `-DWIVRN_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH=ON` to the build configuration. + # Client (headset) #### Build dependencies diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 818aa62a..b1c2522f 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -167,8 +167,16 @@ install(FILES dist/firewalld-wivrn.xml install(TARGETS wivrn-server) set_target_properties(${RUNTIME_TARGET} PROPERTIES EXCLUDE_FROM_ALL FALSE) + +set(_extra_args) +if(WIVRN_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH) +set(_extra_args ABSOLUTE_RUNTIME_PATH) +else() +set(_extra_args RUNTIME_DIR_RELATIVE_TO_MANIFEST ../../../${CMAKE_INSTALL_LIBDIR}) +endif() + generate_openxr_runtime_manifest_at_install( - RUNTIME_DIR_RELATIVE_TO_MANIFEST ../../../${CMAKE_INSTALL_LIBDIR} + ${_extra_args} RUNTIME_TARGET ${RUNTIME_TARGET} DESTINATION share/openxr/1 RELATIVE_RUNTIME_DIR ${CMAKE_INSTALL_LIBDIR}