Skip to content

Commit 033b628

Browse files
Enable Dependency management with fetchcontent
- install llvm20 for linux workflow and configure clang-format search paths for different linux options. - ShaderC download for linux matches the other systems and the previous hack to use system versions reverted. - Renamed the cmake imported targets for the ZEngine and Tetragrama dependencies. - Panzerfaust output config for linux - Change output location for the vulkan-loader to use FetchContent locations
1 parent 39ebde2 commit 033b628

49 files changed

Lines changed: 357 additions & 244 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/Engine-CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
on:
22
push:
3-
branches: [ master, develop, arena-integration ]
3+
branches: [ master, develop, arena-integration, compile_on_linux_fetchcontent ]
44
pull_request:
55
branches: [ master, develop, arena-integration ]
66

.github/workflows/job-cmakebuild-linux.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,17 @@ jobs:
3131
chmod +x llvm.sh
3232
sudo ./llvm.sh 20
3333
34+
<<<<<<< HEAD
3435
- name: Update the list of packages
3536
run: sudo apt-get update
3637

3738
- name: Install Dependencies
39+
=======
40+
- name: Update the list of packages after we added packages.microsoft.com
41+
run: sudo apt-get update
42+
43+
- name: Install development library
44+
>>>>>>> 68a7dabd (Enable Dependency management with fetchcontent)
3845
run: sudo apt-get install libasound2-dev libgl1-mesa-dev libpulse-dev libdbus-1-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxrandr-dev libxss-dev libxt-dev libxxf86vm-dev cmake apt-transport-https software-properties-common gcc g++ powershell clang-format-20 glslang-tools libwayland-dev libxkbcommon-dev
3946

4047
- name: CMake Build
@@ -46,9 +53,15 @@ jobs:
4653
with:
4754
name: Build-linux-${{inputs.configuration}}
4855
path: |
56+
<<<<<<< HEAD
4957
Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/publish/
5058
Result.Linux.x64.${{inputs.configuration}}/__externals/Vulkan-Loader/loader/
5159
Result.Linux.x64.${{inputs.configuration}}/ZEngine/tests/ZEngineTests
60+
=======
61+
Result.Linux.x64.${inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/net8.0/
62+
Result.Linux.x64.${{inputs.configuration}}/_deps/vulkan-loader-build/loader/
63+
Result.Linux.x64.${{inputs.configuration}}/ZEngine/tests/
64+
>>>>>>> 68a7dabd (Enable Dependency management with fetchcontent)
5265
Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.resources.dll
5366
!Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll
5467
!Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.resources.dll

.github/workflows/job-cmakebuild-macOS.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
name: Build-macOS-${{ inputs.architecture }}-${{inputs.configuration}}
3434
path: |
3535
Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/osx-${{ inputs.architecture }}/publish/
36-
Result.Darwin.x64.${{inputs.configuration}}/__externals/Vulkan-Loader/loader/${{ inputs.configuration }}/
36+
Result.Darwin.x64.${{inputs.configuration}}/_deps/vulkan-loader-build/loader/${{ inputs.configuration }}/
3737
Result.Darwin.x64.${{inputs.configuration}}/ZEngine/tests/${{inputs.configuration}}/
3838
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.resources.dll
3939
!Result.Darwin.x64.${{inputs.configuration}}/Panzerfaust/${{inputs.configuration}}/${{inputs.targetFramework}}/**/Microsoft.CodeAnalysis.CSharp.Scripting.resources.dll

.github/workflows/job-cmakebuild-windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ jobs:
4343
with:
4444
name: Vulkan-build-x64-release
4545
path: |
46-
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/release/vulkan-1.dll
47-
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/release/vulkan-1.exp
48-
Result.Windows.x64.MultiConfig/__externals/Vulkan-Loader/loader/release/vulkan-1.lib
46+
Result.Windows.x64.MultiConfig/_deps/vulkan-loader-build/loader/release/vulkan-1.dll
47+
Result.Windows.x64.MultiConfig/_deps/vulkan-loader-build/loader/release/vulkan-1.exp
48+
Result.Windows.x64.MultiConfig/_deps/vulkan-loader-build/loader/release/vulkan-1.lib

.github/workflows/job-deploy-linux.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,8 @@ jobs:
2626
uses: actions/upload-artifact@v4
2727
with:
2828
name: linux-${{ inputs.configuration }}
29+
<<<<<<< HEAD
2930
path: Result.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{ inputs.configuration }}/${{inputs.targetFramework}}/publish/
31+
=======
32+
path: Results.Linux.x64.${{inputs.configuration}}/Panzerfaust/${{ inputs.configuration }}/${{inputs.targetFramework}}/publish/
33+
>>>>>>> 68a7dabd (Enable Dependency management with fetchcontent)

.github/workflows/job-test-linux.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ jobs:
2121
uses: actions/download-artifact@v4
2222
with:
2323
name: Build-linux-${{ inputs.configuration }}
24+
<<<<<<< HEAD
2425
path: Result.Linux.x64.${{ inputs.configuration }}
26+
=======
27+
>>>>>>> 68a7dabd (Enable Dependency management with fetchcontent)
2528

2629
- name: Update access permission of ZEngineTests
2730
run: chmod +x ./Result.Linux.x64.${{ inputs.configuration }}/ZEngine/tests/ZEngineTests

.gitmodules

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +0,0 @@
1-
[submodule "__externals/fmt"]
2-
path = __externals/fmt
3-
url = https://github.com/fmtlib/fmt
4-
[submodule "__externals/stb"]
5-
path = __externals/stb
6-
url = https://github.com/nothings/stb
7-
[submodule "__externals/imgui/src"]
8-
path = __externals/imgui/src
9-
url = https://github.com/ocornut/imgui
10-
[submodule "__externals/spdlog"]
11-
path = __externals/spdlog
12-
url = https://github.com/gabime/spdlog
13-
[submodule "__externals/glfw"]
14-
path = __externals/glfw
15-
url = https://github.com/glfw/glfw
16-
[submodule "__externals/entt"]
17-
path = __externals/entt
18-
url = https://github.com/skypjack/entt
19-
[submodule "__externals/assimp"]
20-
path = __externals/assimp
21-
url = https://github.com/assimp/assimp
22-
[submodule "__externals/stduuid"]
23-
path = __externals/stduuid
24-
url = https://github.com/mariusbancila/stduuid
25-
[submodule "__externals/yaml-cpp"]
26-
path = __externals/yaml-cpp
27-
url = https://github.com/jbeder/yaml-cpp
28-
[submodule "__externals/ImGuizmo"]
29-
path = __externals/ImGuizmo
30-
url = https://github.com/CedricGuillemet/ImGuizmo
31-
[submodule "__externals/SPIRV-Cross"]
32-
path = __externals/SPIRV-Cross
33-
url = https://github.com/KhronosGroup/SPIRV-Cross
34-
[submodule "__externals/gtest"]
35-
path = __externals/gtest
36-
url = https://github.com/google/googletest
37-
[submodule "__externals/VulkanMemoryAllocator"]
38-
path = __externals/VulkanMemoryAllocator
39-
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
40-
[submodule "__externals/nlohmann_json"]
41-
path = __externals/nlohmann_json
42-
url = https://github.com/nlohmann/json
43-
[submodule "__externals/glslang"]
44-
path = __externals/glslang
45-
url = https://github.com/khronosGroup/glslang.git
46-
[submodule "__externals/SPIRV-headers"]
47-
path = __externals/SPIRV-headers
48-
url = https://github.com/khronosGroup/SPIRV-headers.git
49-
[submodule "__externals/SPIRV-Tools"]
50-
path = __externals/SPIRV-Tools
51-
url = https://github.com/khronosGroup/SPIRV-Tools
52-
[submodule "__externals/Vulkan-Loader"]
53-
path = __externals/Vulkan-Loader
54-
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
61-
[submodule "__externals/tlsf/src"]
62-
path = __externals/tlsf/src
63-
url = https://github.com/mattconte/tlsf
64-
[submodule "__externals/CLI11"]
65-
path = __externals/CLI11
66-
url = https://github.com/CLIUtils/CLI11
67-
[submodule "__externals/rapidhash/src"]
68-
path = __externals/rapidhash/src
69-
url = https://github.com/Nicoshev/rapidhash

CMakeLists.txt

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
cmake_minimum_required (VERSION 3.17 FATAL_ERROR)
22

3+
set (CMAKE_CXX_STANDARD_REQUIRED ON)
4+
set (CMAKE_CXX_STANDARD 20)
5+
set (CMAKE_CXX_EXTENSIONS OFF)
6+
37
project (RendererEngine
48
VERSION 1.0
59
DESCRIPTION "Renderer Engine is an open-source 2D - 3D rendering engine written in C/C++"
@@ -10,14 +14,9 @@ set_property (GLOBAL PROPERTY USE_FOLDERS ON)
1014

1115
# Core invariants
1216
#
13-
get_filename_component (ENLISTMENT_ROOT "." ABSOLUTE CACHE)
14-
get_filename_component (EXTERNAL_DIR "${ENLISTMENT_ROOT}/__externals" ABSOLUTE CACHE)
15-
get_filename_component (EXTERNAL_NUGET_DIR "${ENLISTMENT_ROOT}/__externals/nuget" ABSOLUTE CACHE)
16-
17-
include(${ENLISTMENT_ROOT}/Scripts/CMake/NuGet.cmake)
18-
include(${ENLISTMENT_ROOT}/Scripts/CMake/CppWinRT.cmake)
19-
include(${ENLISTMENT_ROOT}/dependencies.cmake)
2017

18+
include(Scripts/CMake/NuGet.cmake)
19+
include(Scripts/CMake/CppWinRT.cmake)
2120

2221
option (COPY_EXAMPLE_PROJECT "Copy example projects that show how to use Launcher" ON)
2322
option (LAUNCHER_ONLY "Build Launcher only" OFF)
@@ -42,30 +41,10 @@ endif()
4241
# Externals dependencies
4342
#
4443
if (NOT LAUNCHER_ONLY)
45-
add_subdirectory (${EXTERNAL_DIR}/fmt)
46-
add_subdirectory (${EXTERNAL_DIR}/imgui)
47-
add_subdirectory (${EXTERNAL_DIR}/glfw)
48-
add_subdirectory (${EXTERNAL_DIR}/spdlog)
49-
add_subdirectory (${EXTERNAL_DIR}/glm)
50-
add_subdirectory (${EXTERNAL_DIR}/entt)
51-
add_subdirectory (${EXTERNAL_DIR}/assimp)
52-
add_subdirectory (${EXTERNAL_DIR}/stduuid)
53-
add_subdirectory (${EXTERNAL_DIR}/yaml-cpp)
54-
add_subdirectory (${EXTERNAL_DIR}/SPIRV-headers)
55-
add_subdirectory (${EXTERNAL_DIR}/SPIRV-Tools)
56-
add_subdirectory (${EXTERNAL_DIR}/glslang)
57-
add_subdirectory (${EXTERNAL_DIR}/SPIRV-Cross)
58-
add_subdirectory (${EXTERNAL_DIR}/gtest)
59-
add_subdirectory (${EXTERNAL_DIR}/VulkanMemoryAllocator)
60-
add_subdirectory (${EXTERNAL_DIR}/tlsf)
61-
add_subdirectory (${EXTERNAL_DIR}/rapidhash)
62-
add_subdirectory (${EXTERNAL_DIR}/CLI11)
63-
64-
set (CMAKE_PREFIX_PATH
65-
${CMAKE_PREFIX_PATH}
66-
${EXTERNAL_DIR}/Vulkan-Headers/build/install/share/cmake
67-
)
68-
add_subdirectory (${EXTERNAL_DIR}/Vulkan-Loader)
44+
45+
## Setup Dependencies
46+
47+
include(dependencies.cmake)
6948

7049
# Core engine lib is here
7150
#

Obelisk/EntryPoint.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
#include <CLI/CLI.hpp>
2+
#include <Editor.h>
23
#include <ZEngine/Core/Memory/MemoryManager.h>
34
#include <ZEngine/EngineConfiguration.h>
45
#include <ZEngine/Logging/Logger.h>
6+
<<<<<<< HEAD:Obelisk/EntryPoint.cpp
57
#include <ZEngine/Applications/GameApplication.h>
68

79
#include <Tetragrama/Editor.h>
10+
=======
11+
>>>>>>> c5669f28 (Enable Dependency management with fetchcontent):Tetragrama/EntryPoint.cpp
812

913
#ifdef ZENGINE_PLATFORM
1014

@@ -18,7 +22,7 @@ int applicationEntryPoint(int argc, char* argv[])
1822
MemoryManager manager = {};
1923
MemoryConfiguration config = {.DefaultSize = ZGiga(3u)};
2024
manager.Initialize(config);
21-
auto arena = &(manager.Allocator);
25+
auto arena = &(manager.ArenaAllocatorValue);
2226

2327
LoggerConfiguration logger_cfg = {};
2428
Logger::Initialize(arena, logger_cfg);

Scripts/RunTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,5 @@ function RunTests {
8787

8888
# Run tests for each configuration
8989
foreach ($config in $Configurations) {
90-
RunTests -Configuration $config
90+
RunTests -Configuration $config
9191
}

0 commit comments

Comments
 (0)