diff --git a/README.md b/README.md index ec977a688..52360a7ad 100644 --- a/README.md +++ b/README.md @@ -65,13 +65,17 @@ so something like the following will build it. Go into the source directory, create a build directory, and change into it. - mkdir build - cd build +```bash +mkdir build +cd build +``` 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. - cmake .. -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" +```bash +cmake .. -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" +``` If you plan to install the runtime, 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 The first command builds the runtime and docs, and the second, which is optional, installs the runtime under `${CMAKE_INSTALL_PREFIX}`. - cmake --build . - cmake --build . --target install +```bash +cmake --build . +cmake --build . --target 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. - make - make install +```bash +make +make install +``` 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. 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: @@ -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 (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 if your clang-format binary isn't named `clang-format`.