Skip to content

Commit 4749b6d

Browse files
include EngineClosedEvent header for windows not linking
1 parent d41827b commit 4749b6d

11 files changed

Lines changed: 186 additions & 7 deletions

File tree

CMakePresets.json

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
{
2+
"version": 10,
3+
"cmakeMinimumRequired": {
4+
"major": 3,
5+
"minor": 23,
6+
"patch": 0
7+
},
8+
"configurePresets":[
9+
{
10+
"name": "Windows_Debug",
11+
"displayName": "Windows Visual Studio Debug",
12+
"generator": "Visual Studio 17 2022",
13+
"binaryDir": "${sourceDir}/../builds/RendererEngine",
14+
"cacheVariables": {
15+
"CMAKE_BUILD_TYPE": "Debug",
16+
17+
"ENTT_INCLUDE_HEADERS": "ON",
18+
19+
"SPDLOG_BUILD_SHARED": "OFF",
20+
"BUILD_STATIC_LIBS": "ON",
21+
"SPDLOG_FMT_EXTERNAL": "ON",
22+
"SPDLOG_FMT_EXTERNAL_HO": "OFF",
23+
24+
"GLFW_BUILD_DOCS": "OFF",
25+
"GLFW_BUILD_EXAMPLES": "OFF",
26+
"GLFW_INSTALL": "OFF",
27+
28+
"ASSIMP_BUILD_TESTS": "OFF",
29+
"ASSIMP_INSTALL": "OFF",
30+
"ASSIMP_BUILD_SAMPLES": "OFF",
31+
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF",
32+
"ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT": "OFF",
33+
"ASSIMP_BUILD_OBJ_IMPORTER": "ON",
34+
"ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT": "OFF",
35+
"ASSIMP_BUILD_OBJ_EXPORTER": "ON",
36+
"ASSIMP_WARNINGS_AS_ERRORS": "OFF",
37+
38+
"UUID_BUILD_TESTS": "OFF",
39+
"UUID_USING_CXX20_SPAN": "ON",
40+
"UUID_SYSTEM_GENERATOR": "OFF",
41+
42+
"YAML_CPP_BUILD_TOOLS": "OFF",
43+
"YAML_CPP_BUILD_TESTS": "OFF",
44+
"YAML_CPP_FORMAT_SOURCE": "OFF",
45+
"YAML_BUILD_SHARED_LIBS": "OFF",
46+
47+
"USE_MASM": "OFF",
48+
"USE_GAS": "OFF",
49+
"UPDATE_DEPS": "ON",
50+
"BUILD_WSI_XCB_SUPPORT": "OFF",
51+
"BUILD_WSI_XLIB_SUPPORT": "OFF",
52+
"BUILD_WSI_WAYLAND_SUPPORT": "OFF",
53+
54+
55+
"ALLOW_EXTERNAL_SPIRV_TOOLS": "ON",
56+
57+
"SPIRV_SKIP_EXECUTABLES": "ON",
58+
"SPIRV_SKIP_TESTS": "ON",
59+
"ENABLE_OPT": "OFF",
60+
61+
"SPIRV_CROSS_ENABLE_TESTS": "OFF",
62+
63+
"CMAKE_POLICY_VERSION_MINIMUM": "3.5"
64+
}
65+
},
66+
{
67+
"name": "Windows_Release",
68+
"displayName": "Windows Visual Studio Release",
69+
"inherits": "Windows_Debug",
70+
"cacheVariables": {
71+
"CMAKE_BUILD_TYPE": "Release",
72+
"ENTT_INCLUDE_HEADERS": "ON",
73+
74+
"SPDLOG_BUILD_SHARED": "OFF",
75+
"BUILD_STATIC_LIBS": "ON",
76+
"SPDLOG_FMT_EXTERNAL": "ON",
77+
"SPDLOG_FMT_EXTERNAL_HO": "OFF",
78+
79+
"GLFW_BUILD_DOCS": "OFF",
80+
"GLFW_BUILD_EXAMPLES": "OFF",
81+
"GLFW_INSTALL": "OFF",
82+
83+
"ASSIMP_BUILD_TESTS": "OFF",
84+
"ASSIMP_INSTALL": "OFF",
85+
"ASSIMP_BUILD_SAMPLES": "OFF",
86+
"ASSIMP_BUILD_ASSIMP_TOOLS": "OFF",
87+
"ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT": "OFF",
88+
"ASSIMP_BUILD_OBJ_IMPORTER": "ON",
89+
"ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT": "OFF",
90+
"ASSIMP_BUILD_OBJ_EXPORTER": "ON",
91+
"ASSIMP_WARNINGS_AS_ERRORS": "OFF",
92+
93+
"UUID_BUILD_TESTS": "OFF",
94+
"UUID_USING_CXX20_SPAN": "ON",
95+
"UUID_SYSTEM_GENERATOR": "OFF",
96+
97+
"YAML_CPP_BUILD_TOOLS": "OFF",
98+
"YAML_CPP_BUILD_TESTS": "OFF",
99+
"YAML_CPP_FORMAT_SOURCE": "OFF",
100+
"YAML_BUILD_SHARED_LIBS": "OFF",
101+
102+
"USE_MASM": "OFF",
103+
"USE_GAS": "OFF",
104+
"UPDATE_DEPS": "ON",
105+
106+
"ALLOW_EXTERNAL_SPIRV_TOOLS": "ON",
107+
108+
"SPIRV_SKIP_EXECUTABLES": "ON",
109+
"SPIRV_SKIP_TESTS": "ON",
110+
"ENABLE_OPT": "OFF",
111+
112+
"SPIRV_CROSS_ENABLE_TESTS": "OFF",
113+
114+
"CMAKE_POLICY_VERSION_MINIMUM": "3.5"
115+
}
116+
},
117+
118+
{
119+
"name": "MacOS_Debug",
120+
"inherits": "Windows_Debug",
121+
"displayName": "MacOS XCode Debug",
122+
"generator": "Ninja"
123+
},
124+
{
125+
"name": "MacOS_Release",
126+
"inherits": "Windows_Release",
127+
"displayName": "MacOS XCode Release",
128+
"generator": "Ninja"
129+
},
130+
131+
{
132+
"name": "Linux_Debug",
133+
"inherits": "Windows_Debug",
134+
"displayName": "Linux Ninja Debug",
135+
"generator": "Ninja"
136+
},
137+
{
138+
"name": "Linux_Release",
139+
"inherits": "Windows_Release",
140+
"displayName": "Linux Ninja Release",
141+
"generator": "Ninja"
142+
}
143+
],
144+
145+
"buildPresets": [
146+
{
147+
"name": "Windows_Debug",
148+
"configurePreset": "Windows_Debug"
149+
},
150+
{
151+
"name": "Windows_Release",
152+
"configurePreset": "Windows_Release"
153+
},
154+
155+
{
156+
"name": "MacOS_Debug",
157+
"configurePreset": "MacOS_Debug"
158+
},
159+
{
160+
"name": "MacOS_Release",
161+
"configurePreset": "MacOS_Release"
162+
},
163+
164+
{
165+
"name": "Linux_Debug",
166+
"configurePreset": "Linux_Debug"
167+
},
168+
{
169+
"name": "Linux_Release",
170+
"configurePreset": "Linux_Release"
171+
}
172+
]
173+
}

Scripts/BuildEngine.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
138138
}
139139

140140
# Define CMake Generator arguments
141-
$cMakeOptions = " -DCMAKE_SYSTEM_NAME=$systemName", " -DCMAKE_BUILD_TYPE=$configuration"
141+
$cMakeOptions = " -DCMAKE_SYSTEM_NAME=$systemName", " -DCMAKE_BUILD_TYPE=$configuration", "-DBUILD_SHARED_LIBS=OFF"
142142
$submoduleCMakeOptions = @{
143143
'ENTT' = @("-DENTT_INCLUDE_HEADERS=ON")
144-
'SPDLOG' = @("-DSPDLOG_BUILD_SHARED=OFF", "-DBUILD_SHARED_LIBS=OFF", "-DSPDLOG_FMT_EXTERNAL=ON", "-DSPDLOG_FMT_EXTERNAL_HO=OFF");
144+
'SPDLOG' = @("-DSPDLOG_BUILD_SHARED=OFF", "-DSPDLOG_FMT_EXTERNAL=ON", "-DSPDLOG_FMT_EXTERNAL_HO=OFF");
145145
'GLFW ' = @("-DGLFW_BUILD_DOCS=OFF", "-DGLFW_BUILD_EXAMPLES=OFF", "-DGLFW_INSTALL=OFF");
146146
'ASSIMP' = @("-DASSIMP_BUILD_TESTS=OFF", "-DASSIMP_INSTALL=OFF", "-DASSIMP_BUILD_SAMPLES=OFF", "-DASSIMP_BUILD_ASSIMP_TOOLS=OFF", "-DASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT=OFF", "-DASSIMP_BUILD_OBJ_IMPORTER=ON", "-DASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT=OFF", "-DASSIMP_BUILD_OBJ_EXPORTER=ON");
147147
'STDUUID' = @("-DUUID_BUILD_TESTS=OFF", "-DUUID_USING_CXX20_SPAN=ON", "-DUUID_SYSTEM_GENERATOR=OFF");
@@ -151,6 +151,7 @@ function Build([string]$configuration, [int]$VsVersion , [bool]$runBuild) {
151151
'SPIRV_TOOLS' = @("-DSPIRV_SKIP_EXECUTABLES=ON", "-DSPIRV_SKIP_TESTS=ON")
152152
'SPIRV_CROSS' = @("-DSPIRV_CROSS_ENABLE_TESTS=OFF")
153153
'LAUNCHER_ONLY' = @("-DLAUNCHER_ONLY=ON")
154+
'GLM' = @("-DGLM_ENABLE_CXX_20=ON")
154155
}
155156

156157
$cMakeCacheVariableOverride = $cMakeOptions -join ' '

Tetragrama/Components/ProjectViewUIComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace Tetragrama::Components
121121

122122
ImGui::PushID(name.c_str());
123123

124-
ImTextureID icon = entry.is_directory() ? reinterpret_cast<ImTextureID>(m_directory_icon.Index) : reinterpret_cast<ImTextureID>(m_file_icon.Index);
124+
ImTextureID icon = entry.is_directory() ? (ImTextureID) m_directory_icon.Index : (ImTextureID) m_file_icon.Index;
125125

126126
const float margin = 5.0f;
127127
ImVec2 cursorPos = ImGui::GetCursorPos();

Tetragrama/Components/SceneViewportUIComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ namespace Tetragrama::Components
9696
m_refresh_texture_handle = false;
9797
}
9898

99-
ImGui::Image(reinterpret_cast<ImTextureID>(m_scene_texture.Index), m_viewport_size, ImVec2(0, 1), ImVec2(1, 0));
99+
ImGui::Image((ImTextureID) m_scene_texture.Index, m_viewport_size, ImVec2(0, 1), ImVec2(1, 0));
100100
// ViewPort bound computation
101101
ImVec2 viewport_windows_size = ImGui::GetWindowSize();
102102
ImVec2 minimum_bound = ImGui::GetWindowPos();

ZEngine/ZEngine/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ target_compile_definitions (zEngineLib
2727
)
2828

2929
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
30-
target_compile_definitions (zEngineLib PUBLIC VK_USE_PLATFORM_WIN32_KHR)
30+
target_compile_definitions (zEngineLib PUBLIC VK_USE_PLATFORM_WIN32_KHR NOMINMAX)
3131
endif()
3232

3333
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

ZEngine/ZEngine/Core/Containers/Array.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22
#include <ZEngine/Core/Containers/InitializerList.h>
33
#include <ZEngine/Core/Memory/Allocator.h>
4+
#include <algorithm>
45

56
using namespace ZEngine::Core::Memory;
67

ZEngine/ZEngine/Engine.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <ZEngine/Engine.h>
2+
#include <ZEngine/Event/EngineClosedEvent.h>
23
#include <ZEngine/Logging/LoggerDefinition.h>
34
#include <ZEngine/Rendering/Renderers/GraphicRenderer.h>
45
#include <ZEngine/Windows/CoreWindow.h>

ZEngine/ZEngine/Hardwares/VulkanDevice.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include <ZEngine/Core/Memory/Allocator.h>
2121
#include <set>
2222
#include <span>
23+
#include <limits>
24+
#include <cstdint>
2325
// clang-format on
2426

2527
namespace ZEngine::Windows

ZEngine/ZEngine/Rendering/Buffers/Bitmap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace ZEngine::Rendering::Buffers
2929
* The A and B values are normalized coordinates in the range [-1, 1], calculated from pixel coordinates (i, j)
3030
* and the face size.
3131
*
32-
* Reference: "Real-Time Rendering, Fourth Edition" by Tomas Akenine-Möller, Eric Haines, Naty Hoffman
32+
* Reference: "Real-Time Rendering, Fourth Edition" by Tomas Akenine-M�ller, Eric Haines, Naty Hoffman
3333
*/
3434
static glm::vec3 FaceCoordToXYZ(int i, int j, int face_id, int face_size)
3535
{

ZEngine/ZEngine/Rendering/Renderers/ImGUIRenderer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ namespace ZEngine::Rendering::Renderers
149149
img_buf->Layout = barrier_spec_1.NewLayout;
150150
Device->EnqueueInstantCommandBuffer(command_buf);
151151

152-
io.Fonts->TexID = reinterpret_cast<ImTextureID>(font_tex_handle.Index);
152+
io.Fonts->TexID = (ImTextureID) font_tex_handle.Index;
153153

154154
auto font_image_info = img_buf->GetDescriptorImageInfo();
155155
uint32_t frame_count = Device->SwapchainImageCount;

0 commit comments

Comments
 (0)