Skip to content

Commit 97315fe

Browse files
no more vulkan sdk installation step
1 parent a8efb87 commit 97315fe

File tree

8 files changed

+29
-12
lines changed

8 files changed

+29
-12
lines changed

.gitmodules

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@
4949
[submodule "__externals/SPIRV-Tools"]
5050
path = __externals/SPIRV-Tools
5151
url = https://github.com/khronosGroup/SPIRV-Tools
52-
[submodule "__externals/Vulkan-Headers"]
53-
path = __externals/Vulkan-Headers
54-
url = https://github.com/KhronosGroup/Vulkan-Headers
5552
[submodule "__externals/Vulkan-Loader"]
5653
path = __externals/Vulkan-Loader
5754
url = https://github.com/KhronosGroup/Vulkan-Loader
55+
[submodule "__externals/glm"]
56+
path = __externals/glm
57+
url = https://github.com/g-truc/glm
58+
[submodule "__externals/Vulkan-Headers"]
59+
path = __externals/Vulkan-Headers
60+
url = https://github.com/KhronosGroup/Vulkan-Headers

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,11 @@ option (COPY_EXAMPLE_PROJECT "Copy example projects that show how to use Launche
2121

2222
# Externals dependencies
2323
#
24-
set (IN_ENGINE_VULKAN_HEADER_PATH ${EXTERNAL_DIR}/Vulkan-Loader/external/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}/Vulkan-Headers/build/install/include)
25-
2624
add_subdirectory (${EXTERNAL_DIR}/fmt)
2725
add_subdirectory (${EXTERNAL_DIR}/imgui)
2826
add_subdirectory (${EXTERNAL_DIR}/glfw)
2927
add_subdirectory (${EXTERNAL_DIR}/spdlog)
28+
add_subdirectory (${EXTERNAL_DIR}/glm)
3029
add_subdirectory (${EXTERNAL_DIR}/entt)
3130
add_subdirectory (${EXTERNAL_DIR}/assimp)
3231
add_subdirectory (${EXTERNAL_DIR}/stduuid)
@@ -40,7 +39,7 @@ add_subdirectory (${EXTERNAL_DIR}/VulkanMemoryAllocator)
4039

4140
set (CMAKE_PREFIX_PATH
4241
${CMAKE_PREFIX_PATH}
43-
${EXTERNAL_DIR}/Vulkan-Loader/external/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}/Vulkan-Headers/build/install/share/cmake
42+
${EXTERNAL_DIR}/Vulkan-Headers/build/install/share/cmake
4443
)
4544
add_subdirectory (${EXTERNAL_DIR}/Vulkan-Loader)
4645

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ Before building, make sure your setup is correct :
2222

2323
- Install Visual Studio 2022 Community or Professional, make sure to add "Desktop development with C++".
2424
- Install [PowerShell Core](https://github.com/PowerShell/PowerShell/releases)
25-
- Install [Vulkan SDK](https://sdk.lunarg.com/sdk/download/1.3.250.1/windows/VulkanSDK-1.3.250.1-Installer.exe)
26-
- Be sure to check the following components:
27-
- GLM headers
2825
- Install [Python](https://www.python.org/ftp/python/3.12.4/python-3.12.4-amd64.exe)
2926

3027
## Building

Scripts/BuildEngine.ps1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,20 @@ $RepoRoot = [IO.Path]::Combine($PSScriptRoot, "..")
7878
Write-Host "Ensuring submodules are initialized and updated..."
7979
git -C $RepoRoot submodule update --init --recursive
8080

81+
82+
Write-Host "Configuring Vulkan-Header submodule..."
83+
84+
$ExternalVulkanHeadersDir = Join-Path -Path $RepoRoot -ChildPath "__externals/Vulkan-Headers"
85+
$ExternalVulkanHeadersOutputDir = Join-Path -Path $ExternalVulkanHeadersDir -ChildPath "build"
86+
$ExternalVulkanHeadersInstallDir = Join-Path -Path $ExternalVulkanHeadersOutputDir -ChildPath "install"
87+
88+
if(-Not (Test-Path -Path $ExternalVulkanHeadersInstallDir))
89+
{
90+
& $cMakeProgram -S $ExternalVulkanHeadersDir -B $ExternalVulkanHeadersOutputDir
91+
& $cMakeProgram --install $ExternalVulkanHeadersOutputDir --prefix $ExternalVulkanHeadersInstallDir
92+
}
93+
94+
8195
function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
8296

8397
$architecture = 'x64'
@@ -123,7 +137,7 @@ function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
123137
'STDUUID' = @("-DUUID_BUILD_TESTS=OFF", "-DUUID_USING_CXX20_SPAN=ON", "-DUUID_SYSTEM_GENERATOR=OFF");
124138
'YAMLCPP' = @("-DYAML_CPP_BUILD_TOOLS=OFF", "-DYAML_CPP_BUILD_TESTS=OFF", "-DYAML_CPP_FORMAT_SOURCE=OFF", "-DYAML_BUILD_SHARED_LIBS=OFF");
125139
'FRAMEWORK' = @("-DBUILD_FRAMEWORK=ON");
126-
'VULKAN_LOADER' = @("-DUPDATE_DEPS=ON", "-DBUILD_TESTS=OFF", "-DUSE_MASM=OFF", "-DUSE_GAS=OFF")
140+
'VULKAN_LOADER' = @("-DVULKAN_HEADERS_INSTALL_DIR=$ExternalVulkanHeadersInstallDir", "-DBUILD_TESTS=OFF", "-DUSE_MASM=OFF", "-DUSE_GAS=OFF")
127141
}
128142

129143
$cMakeCacheVariableOverride = $cMakeOptions -join ' '

__externals/Vulkan-Headers

Submodule Vulkan-Headers added at 78a92e2

__externals/externals.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Packages
22
#
33
set(EXTERNAL_INCLUDE_DIRS
4-
${IN_ENGINE_VULKAN_HEADER_PATH}
4+
${EXTERNAL_DIR}/Vulkan-Headers/build/install/include
55
${EXTERNAL_DIR}/fmt/include
6+
${EXTERNAL_DIR}/glm/glm
67
${EXTERNAL_DIR}/imgui/src
78
${EXTERNAL_DIR}/spdlog/include
89
${EXTERNAL_DIR}/glfw/include
@@ -31,6 +32,7 @@ add_library (imported::External_libs INTERFACE IMPORTED)
3132
target_link_libraries(imported::External_libs INTERFACE
3233
vulkan
3334
fmt
35+
glm
3436
imgui
3537
spdlog
3638
glfw

__externals/glm

Submodule glm added at 84f2045

__externals/imgui/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ target_include_directories (imgui
2222
./src/backends
2323
${EXTERNAL_DIR}/glfw/include
2424
PRIVATE
25-
${IN_ENGINE_VULKAN_HEADER_PATH}
25+
${EXTERNAL_DIR}/Vulkan-Headers/build/install/include
2626
)
2727

0 commit comments

Comments
 (0)