CMake: Add absolute runtime path option for XR manifest

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2024-04-08 16:57:48 +02:00
committed by xytovl
parent 13e54ddaae
commit 126f3cf6c6
3 changed files with 13 additions and 1 deletions
+2
View File
@@ -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)
+2
View File
@@ -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
+9 -1
View File
@@ -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}