Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
blender
monado
Commits
c111f528
Commit
c111f528
authored
Jun 14, 2019
by
Benjamin Saunders
Committed by
Ryan Pavlik
Aug 19, 2019
Browse files
oxr: Optionally install as the default runtime
parent
a0fcaf9b
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
c111f528
...
...
@@ -12,6 +12,7 @@ endif()
option
(
OPENXR_USE_LOADER
"Application uses loader"
ON
)
option
(
OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH
"Use the absolute path to the runtime in the installed manifest, rather than a bare filename."
ON
)
option
(
VULKAN_ENABLE_VALIDATION
"Enable Vulkan validation for Compositor"
ON
)
option
(
INSTALL_ACTIVE_RUNTIME
"Make Monado the default OpenXR runtime on install"
ON
)
###
# Dependencies
...
...
src/xrt/targets/openxr/CMakeLists.txt
View file @
c111f528
...
...
@@ -85,7 +85,10 @@ file(GENERATE
# by a script we generate now.
if
(
CMAKE_SYSTEM_NAME STREQUAL
"Linux"
)
set
(
MANIFEST_RELATIVE_DIR share/openxr/
${
XR_API_MAJOR
}
/
)
if
(
INSTALL_ACTIVE_RUNTIME
)
configure_file
(
active_runtime.cmake
${
CMAKE_CURRENT_BINARY_DIR
}
/active_runtime.cmake @ONLY
)
install
(
SCRIPT
${
CMAKE_CURRENT_BINARY_DIR
}
/active_runtime.cmake
)
endif
()
elseif
(
CMAKE_SYSTEM_NAME STREQUAL
"Windows"
)
# TODO: install target on windows just needs to know where to install manifest
set
(
MANIFEST_RELATIVE_DIR
)
...
...
src/xrt/targets/openxr/active_runtime.cmake
0 → 100644
View file @
c111f528
# SPDX-License-Identifier: BSL-1.0
include
(
GNUInstallDirs
)
set
(
MANIFEST_RELATIVE_DIR @MANIFEST_RELATIVE_DIR@
)
set
(
XR_API_MAJOR @XR_API_MAJOR@
)
set
(
RUNTIME_TARGET @RUNTIME_TARGET@
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E create_symlink
${
CMAKE_INSTALL_PREFIX
}
/
${
MANIFEST_RELATIVE_DIR
}
/
${
RUNTIME_TARGET
}
.json
${
CMAKE_BINARY_DIR
}
/active_runtime.json
)
file
(
INSTALL
DESTINATION
"
${
CMAKE_INSTALL_FULL_SYSCONFDIR
}
/xdg/openxr/
${
XR_API_MAJOR
}
"
TYPE FILE
FILES
"
${
CMAKE_BINARY_DIR
}
/active_runtime.json"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment