docs: Update build doc with known-good info
authorLenny Komow <lenny@lunarg.com>
Tue, 24 Jul 2018 17:45:26 +0000 (11:45 -0600)
committerLenny Komow <lenny@lunarg.com>
Tue, 24 Jul 2018 17:45:26 +0000 (11:45 -0600)
Change-Id: I89fbc453e0ca2b83a3ad8ea3d0756655fe1e651f

BUILD.md

index 6f1d55f87c356e04b3447031fe38ae57fce9f62e..4899ce11b39c3dac9a6411b7c505cac347d09d1e 100644 (file)
--- a/BUILD.md
+++ b/BUILD.md
@@ -95,6 +95,52 @@ the repository and place the `install` directory as a child of the `build`
 directory. The remainder of these instructions follow this convention,
 although you can place these directories in any location.
 
+### Building Dependent Repositories with Known-Good Revisions
+
+There is a Python utility script, `scripts/update_deps.py`, that you can use
+to gather and build the dependent repositories mentioned above. This program
+also uses information stored in the `scripts/known-good.json` file to checkout
+dependent repository revisions that are known to be compatible with the
+revision of this repository that you currently have checked out.
+
+Here is a usage example for this repository:
+
+    git clone git@github.com:KhronosGroup/Vulkan-Loader.git
+    cd Vulkan-Loader
+    mkdir build
+    cd build
+    ../scripts/update_deps.py
+    cmake -C helper.cmake ..
+    cmake --build .
+
+#### Notes
+
+- You may need to adjust some of the CMake options based on your platform. See
+  the platform-specific sections later in this document.
+- The `update_deps.py` script fetches and builds the dependent repositories in
+  the current directory when it is invoked. In this case, they are built in
+  the `build` directory.
+- The `build` directory is also being used to build this
+  (Vulkan-ValidationLayers) repository. But there shouldn't be any conflicts
+  inside the `build` directory between the dependent repositories and the
+  build files for this repository.
+- The `--dir` option for `update_deps.py` can be used to relocate the
+  dependent repositories to another arbitrary directory using an absolute or
+  relative path.
+- The `update_deps.py` script generates a file named `helper.cmake` and places
+  it in the same directory as the dependent repositories (`build` in this
+  case). This file contains CMake commands to set the CMake `*_INSTALL_DIR`
+  variables that are used to point to the install artifacts of the dependent
+  repositories. You can use this file with the `cmake -C` option to set these
+  variables when you generate your build files with CMake. This lets you avoid
+  entering several `*_INSTALL_DIR` variable settings on the CMake command line.
+- If using "MINGW" (Git For Windows), you may wish to run
+  `winpty update_deps.py` in order to avoid buffering all of the script's
+  "print" output until the end and to retain the ability to interrupt script
+  execution.
+- Please use `update_deps.py --help` to list additional options and read the
+  internal documentation in `update_deps.py` for further information.
+
 ### Build Options
 
 When generating native platform build files through CMake, several options can