Skip to content

Commit 1ac84b8

Browse files
use vcpkg for dependency management
1 parent 7a288f4 commit 1ac84b8

14 files changed

Lines changed: 153 additions & 297 deletions

File tree

Obelisk/CMakeLists.txt

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,39 @@ project (Obelisk
66
LANGUAGES CXX
77
)
88

9-
set (CMAKE_CXX_STANDARD_REQUIRED ON)
10-
set (CMAKE_CXX_STANDARD 20)
11-
12-
set (TARGET_NAME Obelisk)
139

1410
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
15-
add_executable (${TARGET_NAME} WIN32)
11+
add_executable (Obelisk WIN32)
1612
else()
17-
add_executable (${TARGET_NAME})
13+
add_executable (Obelisk)
1814
endif()
1915

20-
target_sources(${TARGET_NAME} PUBLIC EntryPoint.cpp)
16+
target_sources(Obelisk PUBLIC EntryPoint.cpp)
2117

2218
# We set this debugger directory to find assets and resources file
2319
# after being copied to Debug and Release output directories
2420
#
2521
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
26-
set_target_properties(${TARGET_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(ProjectDir)$(Configuration)")
22+
set_target_properties(Obelisk PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(ProjectDir)$(Configuration)")
2723
endif ()
2824

29-
target_include_directories (${TARGET_NAME}
25+
target_include_directories (Obelisk
3026
PRIVATE
3127
.
3228
${ENLISTMENT_ROOT}
3329
${ENLISTMENT_ROOT}/ZEngine
3430
)
3531

36-
target_compile_definitions(${TARGET_NAME}
32+
target_compile_definitions(Obelisk
3733
PRIVATE
3834
NOMINMAX
3935
UNICODE
4036
_UNICODE
4137
)
4238

43-
target_link_libraries(${TARGET_NAME} PUBLIC
39+
target_link_libraries(Obelisk PUBLIC
4440
tetragrama
4541
imported::External_obeliskLibs
4642
)
4743

48-
set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
49-
50-
install(TARGETS ${TARGET_NAME} DESTINATION bin)
44+
install(TARGETS Obelisk DESTINATION bin)

Obelisk/EntryPoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <CLI/CLI.hpp>
2-
#include <Tetragrama/Editor.h>
2+
#include <Editor.h>
33
#include <ZEngine/Applications/GameApplication.h>
44
#include <ZEngine/Core/Memory/MemoryManager.h>
55
#include <ZEngine/EngineConfiguration.h>

Tetragrama/CMakeLists.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,25 @@ project (Tetragrama
66
LANGUAGES CXX
77
)
88

9-
set (CMAKE_CXX_STANDARD_REQUIRED ON)
10-
set (CMAKE_CXX_STANDARD 20)
11-
129
file (GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
1310
file (GLOB_RECURSE CPP_FILES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
1411

1512
source_group (TREE ${PROJECT_SOURCE_DIR} PREFIX "Source Files" FILES ${HEADER_FILES} ${CPP_FILES})
1613

1714
set (TARGET_NAME tetragrama)
1815

19-
add_library (${TARGET_NAME})
16+
add_library (tetragrama)
2017

21-
target_sources(${TARGET_NAME} PUBLIC ${HEADER_FILES} ${CPP_FILES})
18+
target_sources(tetragrama PUBLIC ${HEADER_FILES} ${CPP_FILES})
2219

2320
# We set this debugger directory to find assets and resources file
2421
# after being copied to Debug and Release output directories
2522
#
2623
if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
27-
set_target_properties(${TARGET_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(ProjectDir)$(Configuration)")
24+
set_target_properties(tetragrama PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(ProjectDir)$(Configuration)")
2825
endif ()
2926

30-
target_include_directories (${TARGET_NAME}
27+
target_include_directories (tetragrama
3128
PUBLIC
3229
.
3330
./Components
@@ -42,11 +39,11 @@ target_include_directories (${TARGET_NAME}
4239
./Managers
4340
)
4441

45-
target_compile_definitions(${TARGET_NAME}
42+
target_compile_definitions(tetragrama
4643
PRIVATE
4744
NOMINMAX
4845
UNICODE
4946
_UNICODE
5047
)
5148

52-
target_link_libraries(${TARGET_NAME} PUBLIC zEngineLib)
49+
target_link_libraries(tetragrama PUBLIC zEngineLib)

Tetragrama/Components/DockspaceUIComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <Messengers/Messenger.h>
88
#include <ZEngine/Logging/LoggerDefinition.h>
99
#include <fmt/format.h>
10-
#include <imgui/imgui_internal.h>
10+
#include <imgui_internal.h>
1111
#include <atomic>
1212
#include <filesystem>
1313
#include <future>

Tetragrama/Components/HierarchyViewUIComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <Controllers/EditorCameraController.h>
22
#include <Editor.h>
33
#include <HierarchyViewUIComponent.h>
4-
#include <ImGuizmo/ImGuizmo.h>
4+
#include <ImGuizmo.h>
55
#include <ZEngine/Core/Maths/Matrix.h>
66
#include <ZEngine/Managers/AssetManager.h>
77
#include <ZEngine/Rendering/Scenes/GraphicScene.h>

Tetragrama/Components/SceneViewportUIComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <ZEngine/Windows/Inputs/KeyCodeDefinition.h>
88
/**/
99
#include <Editor.h>
10-
#include <ImGuizmo/ImGuizmo.h>
10+
#include <ImGuizmo.h>
1111
#include <filesystem>
1212

1313
using namespace Tetragrama::Components::Event;

Tetragrama/Helpers/UIComponentDrawerHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#pragma once
22
#include <ZEngine/Core/Maths/Vec.h>
33
#include <ZEngine/Rendering/Scenes/GraphicScene.h>
4-
#include <imgui/imgui_internal.h>
4+
#include <imgui_internal.h>
55

66
namespace Tetragrama::Helpers
77
{

ZEngine/ZEngine/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ target_include_directories (zEngineLib
5151
./Serializers
5252
)
5353

54-
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
54+
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
5555
target_compile_definitions (zEngineLib PUBLIC ENABLE_VULKAN_VALIDATION_LAYER)
5656
endif()
5757

@@ -72,8 +72,10 @@ endif()
7272
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
7373
target_link_libraries(zEngineLib PUBLIC stdc++fs)
7474
target_compile_definitions(zEngineLib PUBLIC GLFW_EXPOSE_NATIVE_WAYLAND)
75+
target_compile_options(zEngineLib PUBLIC -Wno-interference-size)
7576
endif ()
7677

7778
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
7879
target_compile_definitions(zEngineLib PUBLIC GLFW_EXPOSE_NATIVE_COCOA)
7980
endif()
81+

ZEngine/ZEngine/Core/Containers/UnorderedHashMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,4 +473,4 @@ namespace ZEngine::Core::Containers
473473
{
474474
return rapidhash(str, Helpers::secure_strlen(str));
475475
}
476-
} // namespace ZEngine::Core::Containers
476+
} // namespace ZEngine::Core::Containers

ZEngine/ZEngine/Hardwares/AsyncResourceLoader.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
#ifdef __GNUC__
1010
#define STBI_NO_SIMD
1111
#endif
12-
#include <stb/stb_image.h>
12+
#include <stb_image.h>
1313

1414
#define STB_IMAGE_WRITE_IMPLEMENTATION
1515
#define STB_IMAGE_RESIZE_IMPLEMENTATION
16-
#include <stb/deprecated/stb_image_resize.h>
17-
#include <stb/stb_image_write.h>
16+
#include <stb_image_resize2.h>
17+
#include <stb_image_write.h>
1818

1919
using namespace ZEngine::Helpers;
2020
using namespace ZEngine::Rendering::Specifications;
@@ -657,7 +657,7 @@ namespace ZEngine::Hardwares
657657
size_t total_pixel = width * height;
658658
size_t buffer_size = total_pixel * 4;
659659
output_buffer.resize(buffer_size);
660-
stbir_resize_float(image_data, width, height, 0, output_buffer.data(), width, height, 0, 4);
660+
stbir_resize_float_linear(image_data, width, height, 0, output_buffer.data(), width, height, 0, static_cast<stbir_pixel_layout>(4));
661661

662662
for (int i = 0; i < total_pixel; ++i)
663663
{
@@ -714,7 +714,7 @@ namespace ZEngine::Hardwares
714714
size_t total_pixel = width * height;
715715
size_t buffer_size = total_pixel * 4;
716716
upload_req.Buffer.resize(buffer_size);
717-
stbir_resize_uint8(image_data, width, height, 0, upload_req.Buffer.data(), width, height, 0, 4);
717+
stbir_resize_uint8_linear(image_data, width, height, 0, upload_req.Buffer.data(), width, height, 0, static_cast<stbir_pixel_layout>(4));
718718

719719
for (int i = 0; i < total_pixel; ++i)
720720
{

0 commit comments

Comments
 (0)