Skip to content

Commit ade3464

Browse files
committed
build: Remove submodules
1 parent 188cad5 commit ade3464

38 files changed

+528
-167
lines changed

.appveyor.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,28 @@ before_build:
6565
- cd build
6666
- cmake -G %GENERATOR% -DCMAKE_INSTALL_PREFIX=install ..
6767
- cmake --build . --config %CONFIGURATION% --target install
68+
# Vulkan-ValidationLayers
69+
- cd %APPVEYOR_BUILD_FOLDER%
70+
- git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
71+
- cd Vulkan-ValidationLayers
72+
- mkdir build
73+
- cd build
74+
- cmake -G %GENERATOR% -DCMAKE_INSTALL_PREFIX=install -DVULKAN_HEADERS_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\Vulkan-Headers\build\install -DVULKAN_LOADER_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\Vulkan-Loader\build\install -DGLSLANG_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\glslang\build\install ..
75+
- cmake --build . --config %CONFIGURATION% --target install
76+
# Vulkan-Tools
77+
- cd %APPVEYOR_BUILD_FOLDER%
78+
- git clone https://github.com/KhronosGroup/Vulkan-Tools.git
79+
- cd Vulkan-Tools
80+
- mkdir build
81+
- cd build
82+
- cmake -G %GENERATOR% -DCMAKE_INSTALL_PREFIX=install -DVULKAN_HEADERS_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\Vulkan-Headers\build\install -DVULKAN_LOADER_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\Vulkan-Loader\build\install ..
83+
- cmake --build . --config %CONFIGURATION% --target install
6884
# Generate build files using CMake for the build step.
6985
- echo Generating CMake files for %GENERATOR%
7086
- cd %APPVEYOR_BUILD_FOLDER%
7187
- mkdir build
7288
- cd build
73-
- cmake -G %GENERATOR% -DGLSLANG_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\glslang\build\install -DVULKAN_LOADER_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\Vulkan-Loader\build\install -DVULKAN_HEADERS_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\Vulkan-Headers\build\install ..
89+
- cmake -G %GENERATOR% -DVULKAN_HEADERS_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\Vulkan-Headers\build\install -DVULKAN_LOADER_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\Vulkan-Loader\build\install -DVULKAN_VALIDATIONLAYERS_INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\Vulkan-ValidationLayers\build\install ..
7490
- echo Building platform=%PLATFORM% configuration=%CONFIGURATION%
7591

7692
platform:

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
[submodule "submodules/jsoncpp"]
22
path = submodules/jsoncpp
33
url = https://github.com/open-source-parsers/jsoncpp.git
4-
[submodule "submodules/Vulkan-ValidationLayers"]
5-
path = submodules/Vulkan-ValidationLayers
6-
url = https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
7-
[submodule "submodules/Vulkan-Tools"]
8-
path = submodules/Vulkan-Tools
9-
url = https://github.com/KhronosGroup/Vulkan-Tools.git

.travis.yml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ script:
8383
cd build
8484
cmake -DCMAKE_BUILD_TYPE=Debug -DVULKAN_HEADERS_INSTALL_DIR=$TRAVIS_BUILD_DIR/Vulkan-Headers/build/install -DCMAKE_INSTALL_PREFIX=install ..
8585
cmake --build . --target install
86+
export LD_LIBRARY_PATH=$PWD/install/lib
8687
popd
8788
git clone https://github.com/KhronosGroup/glslang.git
8889
pushd glslang
@@ -92,29 +93,55 @@ script:
9293
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=install ..
9394
cmake --build . --target install -- -j $core_count
9495
popd
96+
git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers.git
97+
pushd Vulkan-ValidationLayers
98+
git clone https://github.com/google/googletest.git external/googletest
99+
mkdir build
100+
cd build
101+
cmake -DCMAKE_BUILD_TYPE=Debug \
102+
-DCMAKE_INSTALL_PREFIX=install \
103+
-DVULKAN_HEADERS_INSTALL_DIR="$TRAVIS_BUILD_DIR/Vulkan-Headers/build/install" \
104+
-DVULKAN_LOADER_INSTALL_DIR="$TRAVIS_BUILD_DIR/Vulkan-Loader/build/install" \
105+
-DGLSLANG_INSTALL_DIR="$TRAVIS_BUILD_DIR/glslang/build/install" \
106+
..
107+
cmake --build . --target install -- -j $core_count
108+
popd
109+
git clone https://github.com/KhronosGroup/Vulkan-Tools.git
110+
pushd Vulkan-Tools
111+
mkdir build
112+
cd build
113+
cmake -DCMAKE_BUILD_TYPE=Debug \
114+
-DCMAKE_INSTALL_PREFIX=install \
115+
-DVULKAN_HEADERS_INSTALL_DIR="$TRAVIS_BUILD_DIR/Vulkan-Headers/build/install" \
116+
-DVULKAN_LOADER_INSTALL_DIR="$TRAVIS_BUILD_DIR/Vulkan-Loader/build/install" \
117+
..
118+
cmake --build . --target install -- -j $core_count
119+
export VULKAN_TOOLS_BUILD_DIR="$PWD"
120+
popd
95121
fi
96122
- |
97123
if [[ "$VULKAN_BUILD_TARGET" == "LINUX" ]]; then
98124
# Build VulkanTools
99125
./update_external_sources.sh
100-
git clone https://github.com/google/googletest.git submodules/Vulkan-ValidationLayers/external/googletest
101126
mkdir dbuild
102127
pushd dbuild
103128
cmake -DCMAKE_BUILD_TYPE=Debug \
104-
-DGLSLANG_INSTALL_DIR=$TRAVIS_BUILD_DIR/glslang/build/install \
105129
-DVULKAN_HEADERS_INSTALL_DIR=$TRAVIS_BUILD_DIR/Vulkan-Headers/build/install \
106130
-DVULKAN_LOADER_INSTALL_DIR=$TRAVIS_BUILD_DIR/Vulkan-Loader/build/install \
131+
-DVULKAN_VALIDATIONLAYERS_INSTALL_DIR=$TRAVIS_BUILD_DIR/Vulkan-ValidationLayers/build/install \
107132
..
108133
cmake --build . -- -j $core_count
134+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/layers:$PWD/layersvt
135+
export VK_LAYER_PATH=$PWD/layers:$PWD/layersvt
109136
popd
110137
fi
111138
- |
112139
if [[ "$VULKAN_BUILD_TARGET" == "LINUX" ]]; then
113140
# Run Tests
114-
VL_BUILD=$TRAVIS_BUILD_DIR/dbuild/submodules/Vulkan-ValidationLayers
115-
VT_BUILD=$TRAVIS_BUILD_DIR/dbuild/submodules/Vulkan-Tools
116-
DEVSIM_PROFILES=$TRAVIS_BUILD_DIR/submodules/Vulkan-ValidationLayers/tests/device_profiles
117-
export VK_LAYER_PATH=$VL_BUILD/layers:$TRAVIS_BUILD_DIR/dbuild/layersvt
141+
VL_BUILD=$TRAVIS_BUILD_DIR/Vulkan-ValidationLayers/build
142+
VT_BUILD=$TRAVIS_BUILD_DIR/Vulkan-Tools/build
143+
DEVSIM_PROFILES=$TRAVIS_BUILD_DIR/Vulkan-ValidationLayers/tests/device_profiles
144+
export VK_LAYER_PATH=$VK_LAYER_PATH:$VL_BUILD/layers
118145
export VK_ICD_FILENAMES=$VT_BUILD/icd/VkICD_mock_icd.json
119146
# Run vlf_test with mock ICD to ensure layer factory is working
120147
dbuild/tests/vlf_test.sh
@@ -146,7 +173,7 @@ script:
146173
if [[ "$CHECK_FORMAT" == "ON" ]]; then
147174
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
148175
echo "Checking clang-format between TRAVIS_BRANCH=$TRAVIS_BRANCH and TRAVIS_PULL_REQUEST_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH"
149-
./submodules/Vulkan-ValidationLayers/scripts/check_code_format.sh
176+
./scripts/check_code_format.sh
150177
else
151178
echo "Skipping clang-format check since this is not a pull request."
152179
fi

BUILD.md

Lines changed: 80 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,7 @@ sudo apt-get install wget autotools-dev libxcb-keysyms1 libxcb-keysyms1-dev
2525
sudo apt-get install libc6-dev-i386 g++-multilib
2626
```
2727

28-
29-
# [Vulkan-Loader](https://github.com/KhronosGroup/Vulkan-Loader.git)
30-
- Building the VulkanTools repository requires linking to the Vulkan Loader Library (vulkan-1.dll).
31-
Locating the library for this repo can be done in two different ways:
32-
- The Vulkan SDK can be installed. In this case, cmake should be able to locate the loader repo through the VulkanSDK
33-
environment variable
34-
- The library can be built from the [Vulkan-Loader](https://github.com/KhronosGroup/Vulkan-Loader.git) repository. This
35-
can be done by setting 'CMAKE_INSTALL_PREFIX' and building 'install' target from within the Vulkan-Loader repo, noting the install location.
36-
In this case, the following option should be used on the cmake command line:
37-
38-
cmake -DVULKAN_LOADER_INSTALL_DIR=c:\absolute_path_to\Vulkan-Loader\install
39-
40-
# [glslang](https://github.com/KhronosGroup/glslang)
41-
- Ensure that the 'update_glslang_sources.py' script has been run, and the repository successfully built.
42-
- Follow the build instructions in the glslang repository, including INSTALL_PREFIX and 'make install', noting the install dir location.
43-
Indicate the location of the glslang components by using the following cmake option:
44-
cmake -DGLSLANG_INSTALL_DIR=c:\absolute_path_to\glslang\location_of\install ....
45-
46-
## Clone the Repository
47-
48-
Note that the [Vulkan-ValidationLayers repo](https://github.com/KhronosGroup/Vulkan-ValidationLayers) content is included within the VulkanTools repo via a Git Submodule.
28+
## Download the repository
4929

5030
To create your local git repository of VulkanTools:
5131
```
@@ -67,10 +47,8 @@ git submodule update --init --recursive
6747

6848
## Updating the Repository After a Pull
6949

70-
Since the VulkanTools repo now contains Git Submodules, you may occasionally have
71-
to update the source in those submodules.
72-
You will know this needs to be performed when you perform a pull, and you check the
73-
status of your tree with `git status` and something similar to the following shows:
50+
The VulkanTools repository contains a submodules named jsoncpp. You may occasionally have to update the source in those submodules.
51+
You will know this needs to be performed when you perform a pull, and you check the status of your tree with `git status` and something similar to the following shows:
7452

7553
```
7654
(master *)] $ git status
@@ -81,7 +59,7 @@ Changes not staged for commit:
8159
(use "git add <file>..." to update what will be committed)
8260
(use "git checkout -- <file>..." to discard changes in working directory)
8361
84-
modified: submodules/Vulkan-ValidationLayers (new commits)
62+
modified: submodules/jsoncpp (new commits)
8563
8664
no changes added to commit (use "git add" and/or "git commit -a")
8765
```
@@ -103,17 +81,86 @@ Then, update the external sources as before:
10381
Now, you should be able to continue building as normal.
10482

10583

84+
## Repository Dependencies
85+
This repository attempts to resolve some of its dependencies by using
86+
components found from the following places, in this order:
87+
88+
1. CMake or Environment variable overrides (e.g., -DVULKAN_HEADERS_INSTALL_DIR)
89+
1. LunarG Vulkan SDK, located by the `VULKAN_SDK` environment variable
90+
1. System-installed packages, mostly applicable on Linux
91+
92+
Dependencies that cannot be resolved by the SDK or installed packages must be
93+
resolved with the "install directory" override and are listed below. The
94+
"install directory" override can also be used to force the use of a specific
95+
version of that dependency.
96+
97+
### Vulkan-Headers
98+
99+
This repository has a required dependency on the
100+
[Vulkan Headers repository](https://github.com/KhronosGroup/Vulkan-Headers).
101+
You must clone the headers repository and build its `install` target before
102+
building this repository. The Vulkan-Headers repository is required because it
103+
contains the Vulkan API definition files (registry) that are required to build
104+
the validation layers. You must also take note of the headers' install
105+
directory and pass it on the CMake command line for building this repository,
106+
as described below.
107+
108+
### Vulkan-Loader
109+
110+
The tools in this repository depend on the Vulkan loader.
111+
112+
A loader can be used from an installed LunarG SDK, an installed Linux package,
113+
or from a driver installation on Windows.
114+
115+
If a loader is not available from any of these methods and/or it is important
116+
to use a loader built from a repository, then you must build the
117+
[Vulkan-Loader repository](https://github.com/KhronosGroup/Vulkan-Loader.git)
118+
with its install target. Take note of its install directory location and pass
119+
it on the CMake command line for building this repository, as described below.
120+
121+
### Vulkan-ValidationLayers
122+
The tools in this repository depend on the Vulkan validation layers.
123+
124+
Validation layers can be used from an installed LunarG SDK, an installed Linux
125+
package, or from a driver installation on Windows.
126+
127+
If the validation layers are not available from any of these methods and/or
128+
it is important to use the validation layers built from a repository, then you
129+
must build the
130+
[Vulkan-Loader repository](https://github.com/KhronosGroup/Vulkan-Loader.git)
131+
with its install target. Take note of its install directory location and pass
132+
it on the CMake command line for building this repository, as described below.
133+
134+
### Vulkan-Tools
135+
136+
The tests in this repository depend on the Vulkan-Tools repository, which is
137+
hosted under Khronos' GitHub account and differentiated in name by a hyphen.
138+
The tests use vulkaninfo and the mock ICD from Vulkan-Tools.
139+
140+
You may build the
141+
[Vulkan-Tools repository](https://github.com/KhronosGroup/Vulkan-Tools.git)
142+
with its install target. Take note of its build directory location and set
143+
the VULKAN\_TOOLS\_BUILD\_DIR environment variable to the appropriate path.
144+
145+
If you do not intend to run the tests, you do not need Vulkan-Tools.
146+
147+
### Build and Install Directories
148+
149+
A common convention is to place the build directory in the top directory of
150+
the repository with a name of `build` and place the install directory as a
151+
child of the build directory with the name `install`. The remainder of these
152+
instructions follow this convention, although you can use any name for these
153+
directories and place them in any location.
154+
155+
106156
## Linux Build
107157

108158
This build process builds all items in the VulkanTools repository
109159

110160
Example debug build:
111161
```
112-
cd YOUR_DEV_DIRECTORY/VulkanTools # cd to the root of the VulkanTools git repository
113-
if the SDK is installed and the accompanying setup-env.sh script has been run (setting up the VULKAN_SDK environment variable),
114-
cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug -DGLSLANG_INSTALL_DIR=c:\absolute_path_to\glslang\location_of\install
115-
or, if a specific Vulkan Loader library is desired, point to it like so:
116-
cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug -DVULKAN_HEADERS_INSTALL_DIR=/absolute_path_to/Vulkan-Headers/install -DVULKAN_LOADER_INSTALL_DIR=/absolute_path_to/Vulkan-Loader/install -DGLSLANG_INSTALL_DIR=/absolute_path_to_/glslang/location_of/install
162+
cd VulkanTools # cd to the root of the VulkanTools git repository
163+
cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=build/install -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_directory -DVULKAN_LOADER=absolute_path_to_install_directory -DVULKAN_VALIDATION_LAYERS=absolute_path_to_install_directory
117164
cd dbuild
118165
make -j8
119166
```
@@ -149,12 +196,8 @@ Visual Studio is used to build the software, and will re-run CMake as appropriat
149196
To build all Windows targets (e.g. in a "Developer Command Prompt for VS2015" window):
150197
```
151198
cd VulkanTools # cd to the root of the VulkanTools git repository
152-
mkdir build
153-
cd build
154-
If the SDK is installed,
155-
cmake -DGLSLANG_INSTALL_DIR=/absolute_path_to/glslang/location_of/install -G "Visual Studio 14 Win64" ..
156-
or, if a specific Vulkan Loader library is desired, point to it like so:
157-
cmake -DVULKAN_HEADERS_INSTALL_DIR=c:\absolute_path_to\Vulkan-Headers\install -DVULKAN_LOADER_INSTALL_DIR=c:\absolute_path_to\VULKAN_LOADER\install -DGLSLANG_INSTALL_DIR=c:\absolute_path_to\glslang\install -G "Visual Studio 15 2017 Win64" ..
199+
cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=build/install -DVULKAN_HEADERS_INSTALL_DIR=absolute_path_to_install_directory -DVULKAN_LOADER=absolute_path_to_install_directory -DVULKAN_VALIDATION_LAYERS=absolute_path_to_install_directory
200+
cmake --build dbuild --config Debug --target install
158201
```
159202

160203
At this point, you can use Windows Explorer to launch Visual Studio by double-clicking on the "VULKAN.sln" file in the \build folder.

0 commit comments

Comments
 (0)