Skip to content

Commit 8c67f63

Browse files
authored
Merge pull request #169 from rpavlik/manpages
Manpages
2 parents 5211ed8 + 788d8eb commit 8c67f63

File tree

7 files changed

+144
-2
lines changed

7 files changed

+144
-2
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add manual pages for `openxr_runtime_list` and `hello_xr` (based on their `--help`), and install in the standard location on non-Windows platforms.

src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ set(CMAKE_CXX_STANDARD 14)
2020
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
2121
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
2222

23+
include(GNUInstallDirs)
24+
2325
### Dependencies
2426
set(OpenGL_GL_PREFERENCE GLVND)
2527
find_package(OpenGL)

src/loader/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# Author:
1616
#
1717

18-
include(GNUInstallDirs)
19-
2018
if(WIN32)
2119
set(openxr_loader_RESOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/loader.rc)
2220
endif()

src/tests/hello_xr/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,7 @@ endif()
7979

8080
install(TARGETS hello_xr
8181
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
82+
83+
if(NOT WIN32)
84+
install(FILES hello_xr.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/ COMPONENT ManPages)
85+
endif()

src/tests/hello_xr/hello_xr.1

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
.\" Composed by Ryan Pavlik <[email protected]>
2+
.\" Copyright 2020, Collabora, Ltd.
3+
.\" SPDX-License-Identifier: Apache-2.0
4+
.Dd March 06, 2020
5+
.Dt HELLO_XR 1
6+
.Os
7+
.Sh NAME \" Section Header - required - don't modify
8+
.Nm hello_xr
9+
.Nd A sample OpenXR application.
10+
.Sh SYNOPSIS \" Section Header - required - don't modify
11+
.Nm
12+
.Op Fl h | Fl -help
13+
.Nm
14+
.Fl g | Fl -graphics Ar graphics_api
15+
.Op Fl ff | Fl -formfactor Ar form_factor
16+
.Op Fl vc | Fl -viewconfig Ar view_config
17+
.Op Fl bm | Fl -blendmode Ar blend_mode
18+
.Op Fl s | Fl -space Ar space
19+
.Op Fl v | Fl -verbose
20+
.Sh DESCRIPTION \" Section Header - required - don't modify
21+
.Nm
22+
is a sample application written using the
23+
.Tn OpenXR
24+
API.
25+
.Pp
26+
The arguments are as follows:
27+
.Bl -tag -width -indent
28+
.It Fl h | Fl -help
29+
Show brief usage instructions.
30+
.It g | Fl -graphics Ar graphics_api
31+
.Em Required:
32+
specify the graphics API to use.
33+
(Note that not that not all graphics APIs are necessarily available on all systems.)
34+
The parameter
35+
.Ar graphics_api
36+
must be one of the following (case-insensitive):
37+
.Bl -tag
38+
.It Ql D3D11
39+
Direct3D 11 (Windows-only)
40+
.It Ql D3D12
41+
Direct3D 12 (Windows-only)
42+
.It Ql OpenGLES
43+
.It Ql OpenGL
44+
.It Ql Vulkan
45+
.El
46+
.It Fl ff | Fl -formfactor Ar form_factor
47+
Specify the form factor to use.
48+
(Note that you need a suitable XR system and a runtime supporting a given form factor for it to work.)
49+
The parameter
50+
.Ar form_factor
51+
must be one of the following (case-insensitive):
52+
.Bl -tag
53+
.It Ql Hmd
54+
Head-mounted display (default)
55+
.It Ql Handheld
56+
.El
57+
.It Fl vc | Fl -viewconfig Ar view_config
58+
Specify the view configuration to use.
59+
(Note that you need a suitable XR system and a runtime supporting a given view configuration for it to work.)
60+
The parameter
61+
.Ar view_config
62+
must be one of the following (case-insensitive):
63+
.Bl -tag
64+
.It Ql Mono
65+
.It Ql Stereo
66+
(default)
67+
.El
68+
.It Fl bm | Fl -blendmode Ar blend_mode
69+
Specify the environment blend mode to use.
70+
(Note that you need a suitable XR system and a runtime supporting a given environment blend mode for it to work.)
71+
The parameter
72+
.Ar blend_mode
73+
must be one of the following (case-insensitive):
74+
.Bl -tag
75+
.It Ql Opaque
76+
.It Ql Additive
77+
.It Ql AlphaBlend
78+
.El
79+
.It Fl s | Fl -space Ar space
80+
Specify the space to use.
81+
The parameter
82+
.Ar space
83+
must be one of the following (case-insensitive):
84+
.Bl -tag
85+
.It Ql View
86+
.It Ql Local
87+
.It Ql Stage
88+
.El
89+
.It Fl v | Fl -verbose
90+
Enable verbose logging output from the
91+
.Nm
92+
application itself.
93+
.El
94+
.Sh EXIT STATUS
95+
.Ex -std
96+
.Sh SEE ALSO
97+
.Xr openxr_runtime_list 1 ,
98+
https://www.khronos.org/registry/OpenXR/ ,
99+
https://github.com/KhronosGroup/OpenXR-SDK-Source/tree/master/src/tests/hello_xr

src/tests/list/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ set_target_properties(runtime_list PROPERTIES OUTPUT_NAME openxr_runtime_list)
4949

5050
install(TARGETS runtime_list
5151
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
52+
if(NOT WIN32)
53+
install(FILES openxr_runtime_list.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/ COMPONENT ManPages)
54+
endif()
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.\" Composed by Ryan Pavlik <[email protected]>
2+
.\" Copyright 2020, Collabora, Ltd.
3+
.\" SPDX-License-Identifier: Apache-2.0
4+
.Dd March 06, 2020
5+
.Dt OPENXR_RUNTIME_LIST 1
6+
.Os
7+
.Sh NAME \" Section Header - required - don't modify
8+
.Nm openxr_runtime_list
9+
.Nd A minimal OpenXR application that reports information about your OpenXR runtime
10+
.Sh SYNOPSIS \" Section Header - required - don't modify
11+
.Nm
12+
.Sh DESCRIPTION \" Section Header - required - don't modify
13+
.Nm
14+
is a minimal, command-line application written using the
15+
.Tn OpenXR
16+
API.
17+
.Pp
18+
It accepts no arguments.
19+
At startup, it connects to your OpenXR runtime (if available) and reports the following data:
20+
.Bl -bullet
21+
.It
22+
System name
23+
.It
24+
System vendor ID
25+
.It
26+
System ID
27+
.It
28+
Available instance extensions and their versions.
29+
.El
30+
.Sh EXIT STATUS
31+
.Ex -std
32+
.Sh SEE ALSO
33+
.Xr hello_xr 1 ,
34+
https://www.khronos.org/registry/OpenXR/ ,
35+
https://github.com/KhronosGroup/OpenXR-SDK-Source/tree/master/src/tests/list

0 commit comments

Comments
 (0)