Lines Matching +full:cmake +full:-

8 1. [Contributing](#contributing-to-the-repository)
9 1. [Repository Content](#repository-content)
10 1. [Repository Set-Up](#repository-set-up)
11 1. [Windows Build](#building-on-windows)
12 1. [Linux Build](#building-on-linux)
13 1. [Android Build](#building-on-android)
14 1. [MacOS build](#building-on-macos)
33 - *install_dir*`/lib` : The Vulkan validation layer libraries
34 - *install_dir*`/share/vulkan/explicit_layer.d` : The Vulkan validation layer
40 ## Repository Set-Up
44 This repository does not contain a Vulkan-capable driver. You will need to
52 git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
59 1. CMake or Environment variable overrides (e.g., -DVULKAN_HEADERS_INSTALL_DIR)
61 1. System-installed packages, mostly applicable on Linux
68 #### Vulkan-Headers
71 [Vulkan Headers repository](https://github.com/KhronosGroup/Vulkan-Headers).
73 building this repository. The Vulkan-Headers repository is required because it
76 directory and pass it on the CMake command line for building this repository,
89 and pass it on the CMake command line for building this repository, as
100 Vulkan-ValidationLayers repository and run:
104 git checkout tags/release-1.8.1
106 before configuring your build with CMake.
111 #### Vulkan-Loader
121 [Vulkan-Loader repository](https://github.com/KhronosGroup/Vulkan-Loader.git)
123 it on the CMake command line for building this repository, as described below.
135 ### Building Dependent Repositories with Known-Good Revisions
139 also uses information stored in the `scripts/known-good.json` file to checkout
145 git clone git@github.com:KhronosGroup/Vulkan-ValidationLayers.git
146 cd Vulkan-ValidationLayers
150 cmake -C helper.cmake ..
151 cmake --build .
155 - You may need to adjust some of the CMake options based on your platform. See
156 the platform-specific sections later in this document.
157 - The `update_deps.py` script fetches and builds the dependent repositories in
160 - The `build` directory is also being used to build this
161 (Vulkan-ValidationLayers) repository. But there shouldn't be any conflicts
164 - The `--dir` option for `update_deps.py` can be used to relocate the
167 - The `update_deps.py` script generates a file named `helper.cmake` and places
169 case). This file contains CMake commands to set the CMake `*_INSTALL_DIR`
171 repositories. You can use this file with the `cmake -C` option to set these
172 variables when you generate your build files with CMake. This lets you avoid
173 entering several `*_INSTALL_DIR` variable settings on the CMake command line.
174 - If using "MINGW" (Git For Windows), you may wish to run
178 - Please use `update_deps.py --help` to list additional options and read the
183 When generating native platform build files through CMake, several options can
189 | ------ | -------- | ------- | ----------- |
202 | ------ | -------- | ------- | ----------- |
205 These variables should be set using the `-D` option when invoking CMake to
212 - Windows
213 - Any Personal Computer version supported by Microsoft
214 - Microsoft [Visual Studio](https://www.visualstudio.com/)
215 - Versions
216 - [2013 (update 4)](https://www.visualstudio.com/vs/older-downloads/)
217 - [2015](https://www.visualstudio.com/vs/older-downloads/)
218 - [2017](https://www.visualstudio.com/vs/downloads/)
219 - The Community Edition of each of the above versions is sufficient, as
221 - [CMake](http://www.cmake.org/download/) (Version 2.8.11 or better)
222 - Use the installer option to add CMake to the system PATH
223 - Git Client Support
224 - [Git for Windows](http://git-scm.com/download/win) is a popular solution
226 - Some IDEs (e.g., [Visual Studio](https://www.visualstudio.com/),
230 ### Windows Build - Microsoft Visual Studio
232 The general approach is to run CMake to generate the Visual Studio project
233 files. Then either run CMake with the `--build` option to build from the
239 cd Vulkan-ValidationLayers
242 cmake -A x64 -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir \
243 -DGLSLANG_INSTALL_DIR=absolute_path_to_install_dir ..
244 cmake --build .
246 The above commands instruct CMake to find and use the default Visual Studio
248 architecture. The second CMake command builds the Debug (default)
253 #### Use `CMake` to Create the Visual Studio Project Files
258 cd Vulkan-ValidationLayers
261 cmake -A x64 -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir \
262 -DGLSLANG_INSTALL_DIR=absolute_path_to_install_dir ..
264 > Note: The `..` parameter tells `cmake` the location of the top of the
268 The `-A` option is used to select either the "Win32" or "x64" architecture.
273 64-bit: -G "Visual Studio 14 2015 Win64"
274 32-bit: -G "Visual Studio 14 2015"
276 See this [list](#cmake-visual-studio-generators) of other possible generators
279 When generating the project files, the absolute path to a Vulkan-Headers
282 `VULKAN_HEADERS_INSTALL_DIR` CMake variable with the `-D` CMake option. In
284 Vulkan-Headers repository built with the install target.
289 `GLSLANG_INSTALL_DIR` CMake variable with the `-D` CMake option. In either
294 `Vulkan-ValidationLayers.sln` in the build directory.
303 cmake --build .
307 cmake --build . --config Release
313 Launch Visual Studio and open the "Vulkan-ValidationLayers.sln" solution file
315 Configurations drop-down list. Start a build by selecting the Build->Build
320 The CMake project also generates an "install" target that you can use to copy
327 files with CMake.
331 cmake --build . --config Release --target install
337 If you do need to build and use your own loader, build the Vulkan-Loader
338 repository with the install target and modify your CMake invocation to add the
341 cmake -A x64 -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir \
342 -DVULKAN_LOADER_INSTALL_DIR=absolute_path_to_install_dir \
343 -DGLSLANG_INSTALL_DIR=absolute_path_to_install_dir ..
350 [vkcube demo](https://www.github.com/KhronosGroup/Vulkan-Tools.git)
362 .\run_all_tests.ps1 -Debug
366 - `vk_layer_validation_tests`:
371 #### CMake Visual Studio Generators
377 | Build Platform | 64-bit Generator | 32-bit Generator |
378 |------------------------------|-------------------------------|-------------------------|
386 (`vulkan-1.dll`) library as well as any other libraries the program requires.
407 sudo apt-get install git cmake build-essential libx11-xcb-dev \
408 libxkbcommon-dev libwayland-dev libxrandr-dev \
409 libegl1-mesa-dev
413 The general approach is to run CMake to generate make files. Then either run
414 CMake with the `--build` option or `make` to build from the command line.
418 cd Vulkan-ValidationLayers
421 cmake -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir \
422 -DGLSLANG_INSTALL_DIR=absolute_path_to_install_dir ..
427 #### Use CMake to Create the Make Files
432 cd Vulkan-ValidationLayers
435 cmake -DCMAKE_BUILD_TYPE=Debug \
436 -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir \
437 -DGLSLANG_INSTALL_DIR=absolute_path_to_install_dir \
438 -DCMAKE_INSTALL_PREFIX=install ..
440 > Note: The `..` parameter tells `cmake` the location of the top of the
444 Use `-DCMAKE_BUILD_TYPE` to specify a Debug or Release build.
446 When generating the project files, the absolute path to a Vulkan-Headers
449 `VULKAN_HEADERS_INSTALL_DIR` CMake variable with the `-D` CMake option. In
451 Vulkan-Headers repository built with the install target.
456 `GLSLANG_INSTALL_DIR` CMake variable with the `-D` CMake option. In either
469 To speed up the build on a multi-core machine, use the `-j` option for `make`
472 make -j4
476 cmake --build .
478 If your build system supports ccache, you can enable that via CMake option `-DUSE_CCACHE=On`
485 Vulkan-defined WSI display servers: Xcb, Xlib, and Wayland. It is recommended
489 CMake option of the form `BUILD_WSI_xxx_SUPPORT` can be set to `OFF`.
505 specified when creating the build files with CMake:
507 - `/usr/local/lib`: Vulkan layers shared objects
508 - `/usr/local/share/vulkan/explicit_layer.d`: Layer JSON files
514 CMake variables to override their defaults. For example, if you would like to
515 install to `/tmp/build` instead of `/usr/local`, on your CMake command line
518 -DCMAKE_INSTALL_PREFIX=/tmp/build
524 See the CMake documentation for more details on using these variables to
528 Vulkan-Loader repository for more information about loader and layer
545 - `vk_layer_validation_tests`: Test Vulkan validation layers
547 #### Linux 32-bit support
549 Usage of this repository's contents in 32-bit Linux environments is not
550 officially supported. However, since this repository is supported on 32-bit
551 Windows, these modules should generally work on 32-bit Linux.
553 Here are some notes for building 32-bit targets on a 64-bit Ubuntu "reference"
556 If not already installed, install the following 32-bit development libraries:
558 `gcc-multilib g++-multilib libx11-dev:i386`
563 Set up your environment for building 32-bit targets:
565 export ASFLAGS=--32
566 export CFLAGS=-m32
567 export CXXFLAGS=-m32
568 export PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu
572 Finally, rebuild the repository using `cmake` and `make`, as explained above.
578 You can run the `vkcube` or `vulkaninfo` applications from the Vulkan-Tools
588 - Install [Android Studio 2.3](https://developer.android.com/studio/index.html)
590 - From the "Welcome to Android Studio" splash screen, add the following
592 - SDK Platforms > Android 6.0 and newer
593 - SDK Tools > Android SDK Build-Tools
594 - SDK Tools > Android SDK Platform-Tools
595 - SDK Tools > Android SDK Tools
596 - SDK Tools > NDK
600 For each of the below, you may need to specify a different build-tools
606 export ANDROID_NDK_HOME=$HOME/Android/sdk/ndk-bundle
609 export PATH=$ANDROID_SDK_HOME/build-tools/23.0.3:$PATH
614 set ANDROID_NDK_HOME=%LOCALAPPDATA%\Android\sdk\ndk-bundle
615 set PATH=%LOCALAPPDATA%\Android\sdk\ndk-bundle;%PATH%
620 export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle
622 export PATH=$ANDROID_SDK_HOME/build-tools/23.0.3:$PATH
628 sudo apt-get install openjdk-8-jdk
636 - Follow instructions on [brew.sh](http://brew.sh) to get Homebrew installed.
638 … /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
640 - Ensure Homebrew is at the beginning of your PATH:
644 - Add packages with the following:
646 brew install cmake python
652 with SPIRV tools from the NDK, remove the build-android/third_party directory
659 cd build-android
662 Resulting validation layer binaries will be in build-android/libs. Test and
665 ./install_all.sh [-s <serial number>]
675 cd build-android
676 ./update_external_sources_android.sh --no-build
677 ./android-generate.sh
678 ndk-build -j4
685 cd build-android
687 android-generate.bat
688 ndk-build
701 cd build-android
703 adb install -r bin/VulkanLayerValidationTests.apk
709 test_APK.sh -s <serial number> -p <plaform name> -f <gtest_filter>
719 - Follow instructions on [brew.sh](http://brew.sh) to get Homebrew installed.
721 … /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
723 - Ensure Homebrew is at the beginning of your PATH:
727 - Add packages with the following (may need refinement)
729 brew install cmake python python3 git
733 Clone the Vulkan-ValidationLayers repository:
735 git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
739 #### CMake Generators
741 This repository uses CMake to generate build or project files that are then
742 used to build the repository. The CMake generators explicitly supported in
745 - Unix Makefiles
746 - Xcode
755 cmake -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir \
756 -DGLSLANG_INSTALL_DIR=absolute_path_to_install_dir \
757 -DCMAKE_BUILD_TYPE=Debug ..
760 To speed up the build on a multi-core machine, use the `-j` option for `make`
763 make -j4
769 mkdir build-xcode
770 cd build-xcode
771 cmake -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_dir \
772 -DGLSLANG_INSTALL_DIR=absolute_path_to_install_dir \
773 -GXcode ..
782 You can run the `vulkaninfo` applications from the Vulkan-Tools repository to
794 - MoltenVK ICD
795 - Mock ICD
801 You will have to direct the loader from Vulkan-Loader to the MoltenVK ICD:
807 Clone and build the [Vulkan-Tools](https://github.com/KhronosGroup/Vulkan-Tools) repository.
809 You will have to direct the loader from Vulkan-Loader to the Mock ICD:
811 export VK_ICD_FILENAMES=<path to Vulkan-Tools repository>/build/icd/VkICD_mock_icd.json
821 - `vk_layer_validation_tests`: Test Vulkan validation layers
825 [Vulkan-Tools](https://github.com/KhronosGroup/Vulkan-Tools)