Skip to content

Commit af75322

Browse files
Raelrjonjondev
authored andcommitted
Updated README
1 parent dfb241f commit af75322

File tree

2 files changed

+34
-30
lines changed

2 files changed

+34
-30
lines changed

README.md

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,23 @@ The following are dependencies for building and running the project:
4747
- [CMake](https://cmake.org/)
4848
- **macOS**
4949
- [GNU Make](https://www.gnu.org/software/make/)
50-
- [Clang Format](https://clang.llvm.org/docs/ClangFormat.html) (Linux & MacOS)
50+
- [Clang Format](https://clang.llvm.org/docs/ClangFormat.html)
51+
- [Xcode Command Line Tools](https://developer.apple.com/download/) (via `xcode-select --install`)
5152
- **Windows**
5253
- [MinGW32 Make](https://www.mingw-w64.org/)
5354
- [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/)
5455
- **Linux**
55-
- For linux environments the following packages are required for building the dependencies:
56+
- [Clang Format](https://clang.llvm.org/docs/ClangFormat.html)
57+
- The following packages are required for building the dependencies:
58+
- `git`
59+
- `build-essential`
5660
- `libx11-xcb-dev`
5761
- `libxkbcommon-dev`
5862
- `libwayland-dev`
5963
- `libxrandr-dev`
6064
- `libasound2-dev`
6165
- `mesa-common-dev`
6266
- `libx11-dev`
63-
- `libxrandr-dev`
6467
- `libxi-dev`
6568
- `xorg-dev`
6669
- `libgl1-mesa-dev`
@@ -69,12 +72,11 @@ The following are dependencies for building and running the project:
6972
These can be installed using `apt-get` or an equivalent package manager for your Linux distribution:
7073

7174
```console
72-
// Only required if not building with the Vulkan SDK
7375
$ sudo apt-get update
7476
$ sudo apt-get install git build-essential libx11-xcb-dev libxkbcommon-dev libwayland-dev libxrandr-dev
7577

7678
// Required for building GLFW
77-
$ sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
79+
$ sudo apt-get install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
7880
```
7981

8082
### Setup
@@ -93,9 +95,9 @@ $ sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi
9395

9496
3. This should install all required dependencies. Once completed a `.env` file will be generated with all required variables. If the build is completed with no issue then you can proceed to build the project.
9597

96-
#### Building With Validation Layers
98+
#### Setup With Validation Layers
9799

98-
If you want to build with validation layers then the setup scripts should be run by passing the `--include-validation-layers` flag:
100+
If you want to build with validation layers then the setup scripts should be run instead by passing the validation layers include flag:
99101

100102
```console
101103
// Linux & macOS
@@ -117,14 +119,14 @@ Assuming all dependencies have been satisfied, the project can be built using th
117119
$ make
118120

119121
// Linux and macOS (with validation layers)
120-
$ make CXXFLAGS="-DENABLE_VALIDATION_LAYERS=1"
122+
$ make CXXFLAGS="-DENABLE_VALIDATION_LAYERS"
121123
```
122124
```console
123125
// Windows
124126
> mingw32-make
125127

126128
// Windows (with validation layers)
127-
> mingw32-make CXXFLAGS="-DENABLE_VALIDATION_LAYERS=1"
129+
> mingw32-make CXXFLAGS="-DENABLE_VALIDATION_LAYERS"
128130
```
129131

130132
Once it completes, all targets should be built and ready to run from the newly generated `output` directory.
@@ -137,13 +139,13 @@ You can see examples of this in any of the application targets under `examples`.
137139

138140
#### Compile Options
139141

140-
| Option | Default Value | Description |
141-
| ------------------------------ | ---------------- | -------------------------------------------------------------------------------- |
142-
| **DEBUG** | `1` | When set to `1`, will compile in debug mode, and default **CC_LOG_LEVEL** to `2` |
143-
| **CC_LOG_LEVEL** | `2` | Sets the logging verbosity to `info` (`2`), `warning` (`1`), and `error` (`0`) |
144-
| **ENABLE_VALIDATION_LAYERS** | `0` | When set to `1`, will enable Vulkan validation layers for the executable |
145-
| **CXX** | `g++`/`clang++` | Sets the compiler to use during build steps (default differs per-platform) |
146-
| **CXXFLAGS** | N/A | Allows for the specification of compile directives, such as macro definitions |
142+
| Option | Default Value | Description |
143+
| ---------------------------- |------------------|----------------------------------------------------------------------------------|
144+
| **DEBUG** | `1` | When set to `1`, will compile in debug mode, and default **CC_LOG_LEVEL** to `2` |
145+
| **CC_LOG_LEVEL** | `2` | Sets the logging verbosity to `info` (`2`), `warning` (`1`), and `error` (`0`) |
146+
| **ENABLE_VALIDATION_LAYERS** | N/A | When set, will enable Vulkan validation layers for the executable |
147+
| **CXX** | `g++`/`clang++` | Sets the compiler to use during build steps (default differs per-platform) |
148+
| **CXXFLAGS** | N/A | Allows for the specification of compile directives, such as macro definitions |
147149

148150
## Project Structure
149151

@@ -152,6 +154,7 @@ You can see examples of this in any of the application targets under `examples`.
152154
├─[engine]
153155
│ ├─[core] <- the engine's core library
154156
│ ├─[render] <- the engine's renderer
157+
│ ├─[window] <- the engine's windowing and input library
155158
│ ├─[utils] <- the engine's utils library
156159
157160
├─[examples]

scripts/setup.ps1

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ param (
1414
[string] $Glslang_Version="12.2.0"
1515
[string] $Robin_Hood_Hashing_Version="3.11.5"
1616
[string] $Generator="MinGW Makefiles"
17-
[string] $Vendor_Dir="$Root_Dir\vendor"
17+
[string] $Vendor_Dir="$Root_Dir/vendor".Replace('\','/')
1818

19-
[string] $Bin_Dir="$Root_Dir\bin"
20-
[string] $Build_Dir="examples\render\build"
19+
[string] $Bin_Dir="$Root_Dir/bin".Replace('\','/')
20+
[string] $Build_Dir="examples/render/build"
2121

22-
[string] $Vulkan_Vendor_Dir="$Vendor_Dir/vulkan"
23-
[string] $Vulkan_Lib_Dir="$Vulkan_Vendor_Dir/lib"
24-
[string] $Vulkan_Include_Dir="$Vulkan_Vendor_Dir/include"
25-
[string] $Volk_Include_Dir="$Vulkan_Vendor_Dir/include/volk"
22+
[string] $Vulkan_Vendor_Dir="$Vendor_Dir/vulkan".Replace('\','/')
23+
[string] $Vulkan_Lib_Dir="$Vulkan_Vendor_Dir/lib".Replace('\','/')
24+
[string] $Vulkan_Include_Dir="$Vulkan_Vendor_Dir/include".Replace('\','/')
25+
[string] $Volk_Include_Dir="$Vulkan_Vendor_Dir/include/volk".Replace('\','/')
2626

2727
function Make-Dir {
2828
param ( [string] $Dir_Path )
@@ -184,7 +184,7 @@ function Setup-Vulkan-Headers {
184184

185185
Make-Dir $Vulkan_Include_Dir
186186

187-
Copy-Item -Path "$Vulkan_Vendor_Dir/Vulkan-Headers/build/install/include" -Destination $Vulkan_Include_Dir -Recurse
187+
Get-ChildItem "$Vulkan_Vendor_Dir/Vulkan-Headers/build/install/include" | Copy-Item -Destination $Vulkan_Include_Dir -Recurse
188188
}
189189

190190
function Setup-Vulkan-Loader {
@@ -260,6 +260,8 @@ function Setup-Spirv-Tools {
260260
Make-Dir $build_dir
261261

262262
cmake .. -DCMAKE_BUILD_TYPE=Release -DSPIRV_SKIP_TESTS=ON -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR="$Vulkan_Vendor_Dir/SPIRV-Headers" -DCMAKE_INSTALL_PREFIX="$build_dir\install" -S"$Vulkan_Vendor_Dir\SPIRV-Tools" -B"$build_dir"
263+
264+
cmake -DCMAKE_BUILD_TYPE=Release -DSPIRV_SKIP_TESTS=ON -DSPIRV_WERROR=OFF -DSPIRV-Headers_SOURCE_DIR="$Vulkan_Vendor_Dir/SPIRV-Headers" -DCMAKE_INSTALL_PREFIX="$build_dir\install" -S"$Vulkan_Vendor_Dir\SPIRV-Tools" -B"$build_dir"
263265
cmake --build $build_dir --parallel $env:NUMBER_OF_PROCESSORS --target install --config Release
264266
}
265267

@@ -275,24 +277,23 @@ function Setup-Validation-Layers {
275277

276278
Make-Dir $build_dir
277279

278-
cmake `
279-
-DVULKAN_HEADERS_INSTALL_DIR="$Vulkan_Vendor_Dir/Vulkan-Headers/build/install" ` `
280+
cmake `
281+
-DVULKAN_HEADERS_INSTALL_DIR="$Vulkan_Vendor_Dir/Vulkan-Headers/build/install" `
280282
-DGLSLANG_INSTALL_DIR="$Vulkan_Vendor_Dir/glslang/build/install" `
281283
-DSPIRV_HEADERS_INSTALL_DIR="$Vulkan_Vendor_Dir/SPIRV-Headers/build/install" `
282284
-DSPIRV_TOOLS_INSTALL_DIR="$Vulkan_Vendor_Dir/SPIRV-Tools/build/install" `
283285
-DROBIN_HOOD_HASHING_INSTALL_DIR="$Vulkan_Vendor_Dir/robin-hood-hashing/build/install" `
284-
-DCMAKE_BUILD_TYPE=Release `
285286
-DCMAKE_INSTALL_PREFIX="$build_dir" `
286287
-DBUILD_TESTS=OFF `
287288
-S"$Vulkan_Vendor_Dir/Vulkan-ValidationLayers" `
288289
-B"$build_dir"
289290

290-
cmake --build "$build_dir" --config Release --target install -j"$env:NUMBER_OF_PROCESSORS"
291+
cmake --build $build_dir --parallel $env:NUMBER_OF_PROCESSORS --target install --config Release
291292

292293
Make-Dir "$Vulkan_Lib_Dir/explicit_layer.d"
293294

294-
Copy-Item -Path "$build_dir/layers/Release/*" -Destination "$Vulkan_Lib_Dir/explicit_layer.d" -Include "*.json" -Recurse
295-
Copy-Item -Path "$build_dir/layers/Release/*" -Destination "$Vulkan_Lib_Dir/explicit_layer.d" -Include "*.dll" -Recurse
295+
Copy-Item -Path "$build_dir/bin/*" -Destination "$Vulkan_Lib_Dir/explicit_layer.d" -Include "*.json" -Recurse
296+
Copy-Item -Path "$build_dir/bin/*" -Destination "$Vulkan_Lib_Dir/explicit_layer.d" -Include "*.dll" -Recurse
296297
}
297298

298299
Write-Output "Setting up dependencies..."

0 commit comments

Comments
 (0)