Skip to content
Snippets Groups Projects
Commit 2e55d2ab authored by Jakob Bornecrantz's avatar Jakob Bornecrantz
Browse files

README: Highlight all cli commands as bash

parent bbf484f5
No related branches found
No related tags found
No related merge requests found
...@@ -65,13 +65,17 @@ so something like the following will build it. ...@@ -65,13 +65,17 @@ so something like the following will build it.
Go into the source directory, create a build directory, Go into the source directory, create a build directory,
and change into it. and change into it.
mkdir build ```bash
cd build mkdir build
cd build
```
Then, invoke [CMake to generate a project][cmake-generate]. Then, invoke [CMake to generate a project][cmake-generate].
Feel free to change the build type or generator ("Ninja" is fast and parallel) as you see fit. Feel free to change the build type or generator ("Ninja" is fast and parallel) as you see fit.
cmake .. -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" ```bash
cmake .. -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles"
```
If you plan to install the runtime, If you plan to install the runtime,
append something like `-DCMAKE_INSTALL_PREFIX=~/.local` append something like `-DCMAKE_INSTALL_PREFIX=~/.local`
...@@ -83,14 +87,18 @@ though you can manually invoke your build tool (`make`, `ninja`, etc.) if you pr ...@@ -83,14 +87,18 @@ though you can manually invoke your build tool (`make`, `ninja`, etc.) if you pr
The first command builds the runtime and docs, The first command builds the runtime and docs,
and the second, which is optional, installs the runtime under `${CMAKE_INSTALL_PREFIX}`. and the second, which is optional, installs the runtime under `${CMAKE_INSTALL_PREFIX}`.
cmake --build . ```bash
cmake --build . --target install cmake --build .
cmake --build . --target install
```
Alternately, if using Make, the following will build the runtime and docs, then install. Alternately, if using Make, the following will build the runtime and docs, then install.
Replace `make` with `ninja` if you used the Ninja generator. Replace `make` with `ninja` if you used the Ninja generator.
make ```bash
make install make
make install
```
Documentation can be browsed by opening `doc/html/index.html` in the build directory in a web browser. Documentation can be browsed by opening `doc/html/index.html` in the build directory in a web browser.
...@@ -109,7 +117,9 @@ OpenXR loader and API layers. ...@@ -109,7 +117,9 @@ OpenXR loader and API layers.
The OpenXR loader can be pointed to a runtime json file in a nonstandard location with the environment variable `XR_RUNTIME_JSON`. Example: The OpenXR loader can be pointed to a runtime json file in a nonstandard location with the environment variable `XR_RUNTIME_JSON`. Example:
XR_RUNTIME_JSON=~/monado/build/openxr_monado-dev.json ./openxr-example ```bash
XR_RUNTIME_JSON=~/monado/build/openxr_monado-dev.json ./openxr-example
```
For this reason this runtime creates two manifest files within the build directory: For this reason this runtime creates two manifest files within the build directory:
...@@ -163,7 +173,9 @@ To manually apply clang-format to every non-external source file in the tree, ...@@ -163,7 +173,9 @@ To manually apply clang-format to every non-external source file in the tree,
run this command in the source dir with a `sh`-compatible shell run this command in the source dir with a `sh`-compatible shell
(Git for Windows git-bash should be OK): (Git for Windows git-bash should be OK):
scripts/format-project.sh ```bash
scripts/format-project.sh
```
You can optionally put something like `CLANG_FORMAT=clang-format-7` before that command You can optionally put something like `CLANG_FORMAT=clang-format-7` before that command
if your clang-format binary isn't named `clang-format`. if your clang-format binary isn't named `clang-format`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment