aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Kniager <jeremyk@lunarg.com>2018-05-17 11:52:38 -0600
committerjeremyk-lunarg <jeremyk@lunarg.com>2018-05-21 15:50:49 -0600
commit802b77d61305f611a5ec0dc983956ced0ad382a1 (patch)
treebaa0dd3fb1a57670217de91d8481cdefbd0f9a8a
parentba8dbbfe37a76d473703ee5123bc048cee9d096f (diff)
downloadusermoji-802b77d61305f611a5ec0dc983956ced0ad382a1.tar.xz
docs: Update BUILD.md to reflect CMake changes
Updated BUILD.md to reflect the changes in the MacOS build workflow after the repo split. Change-Id: Iff5f89c960b73fec0d1f0b08c7aa448da4873384
-rw-r--r--BUILD.md34
1 files changed, 23 insertions, 11 deletions
diff --git a/BUILD.md b/BUILD.md
index 45f417a1..747aa160 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -30,7 +30,7 @@ graphics hardware vendor and install it properly.
To create your local git repository:
- git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers
+ git clone https://github.com/KhronosGroup/Vulkan-Tools
## Building On Windows
@@ -420,7 +420,19 @@ Clone the Vulkan-LoaderAndValidationLayers repository:
### Get the External Libraries
-TODO: Update with macOS procedure for satisfying external dependencies
+[MoltenVK](https://github.com/KhronosGroup/MoltenVK) Library
+
+- Building the cube and vulkaninfo applications require linking to the MoltenVK Library (libMoltenVK.dylib)
+ - The following option should be used on the cmake command line to specify a vulkan loader library:
+ MOLTENVK_REPO_ROOT=/absolute_path_to/MoltenVK making sure to specify an absolute path, like so:
+ cmake -DMOLTENVK_REPO_ROOT=/absolute_path_to/MoltenVK ....
+
+Vulkan Loader Library
+
+- Building the cube and vulkaninfo applications require linking to the Vulkan Loader Library (libvulkan.1.dylib)
+ - The following option should be used on the cmake command line to specify a vulkan loader library:
+ LOADER_REPO_ROOT=/absolute_path_to/Vulkan-Loader making sure to specify an absolute path, like so:
+ cmake -DLOADER_REPO_ROOT=/absolute_path_to/Vulkan-Loader ....
### MacOS build
@@ -440,7 +452,7 @@ build is:
mkdir build
cd build
- cmake -DCMAKE_BUILD_TYPE=Debug ..
+ cmake -DCMAKE_BUILD_TYPE=Debug -DLOADER_REPO_ROOT=/absolute_path_to/Vulkan-Loader -DMOLTENVK_REPO_ROOT=/absolute_path_to/MoltenVK ..
make
To speed up the build on a multi-core machine, use the `-j` option for `make`
@@ -451,9 +463,9 @@ For example:
You can now run the demo applications from the command line:
- open demos/cube.app
- open demos/cubepp.app
- open demos/vulkaninfo.app
+ open cube/cube.app
+ open cube/cubepp.app
+ open vulkaninfo/vulkaninfo.app
Or you can locate them from `Finder` and launch them from there.
@@ -465,7 +477,7 @@ in your build tree.
To see this, run this command from your `build` directory:
- otool -l demos/cube.app/Contents/MacOS/cube
+ otool -l cube/cube.app/Contents/MacOS/cube
and note that the `cube` executable contains loader commands:
@@ -502,19 +514,19 @@ In both cases, the "install" target operations clean up the `RPATH`.
There is also a non-bundled version of the `vulkaninfo` application that you can
run from the command line:
- demos/vulkaninfo
+ vulkaninfo/vulkaninfo
If you run this before you run "make install", vulkaninfo's RPATH is already set
to point to the Vulkan loader in the build tree, so it has no trouble finding it.
But the loader will not find the MoltenVK driver and you'll see a message about an
incompatible driver. To remedy this:
- VK_ICD_FILENAMES=../external/MoltenVK/Package/Latest/MoltenVK/macOS/MoltenVK_icd.json demos/vulkaninfo
+ VK_ICD_FILENAMES=<path-to>/MoltenVK/Package/Latest/MoltenVK/macOS/MoltenVK_icd.json demos/vulkaninfo
If you run `vulkaninfo` after doing a "make install", the `RPATH` in the `vulkaninfo` application
got removed and the OS needs extra help to locate the Vulkan loader:
- DYLD_LIBRARY_PATH=loader VK_ICD_FILENAMES=../external/MoltenVK/Package/Latest/MoltenVK/macOS/MoltenVK_icd.json demos/vulkaninfo
+ DYLD_LIBRARY_PATH=<path-to>/Vulkan-Loader/loader VK_ICD_FILENAMES=<path-to>/MoltenVK/Package/Latest/MoltenVK/macOS/MoltenVK_icd.json demos/vulkaninfo
#### Building with the Xcode Generator
@@ -522,7 +534,7 @@ To create and open an Xcode project:
mkdir build-xcode
cd build-xcode
- cmake -GXcode ..
+ cmake -DLOADER_REPO_ROOT=/absolute_path_to/Vulkan-Loader -DMOLTENVK_REPO_ROOT=/absolute_path_to/MoltenVK -GXcode ..
open VULKAN.xcodeproj
Within Xcode, you can select Debug or Release builds in the project's Build Settings.