From 36288bd5b034e83f618943c410bc7a4bfb98eb6e Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Thu, 28 Sep 2023 13:19:11 +0200 Subject: [PATCH] Update dependencies --- 3rdParty/CMakeLists.txt | 3 ++- 3rdParty/libstud-uuid/CMakeLists.txt | 10 ++++++++++ 3rdParty/yaml-cpp/CMakeLists.txt | 2 +- CMakeLists.txt | 4 +--- openVulkanoCpp/IO/Archive/MultiPartArchiveWriter.cpp | 2 +- 5 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 3rdParty/libstud-uuid/CMakeLists.txt diff --git a/3rdParty/CMakeLists.txt b/3rdParty/CMakeLists.txt index a5477a0..0c31b4d 100644 --- a/3rdParty/CMakeLists.txt +++ b/3rdParty/CMakeLists.txt @@ -6,8 +6,8 @@ endif() if (NOT LINUX) add_subdirectory(spdlog) add_subdirectory(assimp) - add_subdirectory(yaml-cpp) endif() +add_subdirectory(yaml-cpp) add_subdirectory(magic-enum) add_subdirectory(pugixml) add_subdirectory(stb) @@ -15,6 +15,7 @@ add_subdirectory(eigen) add_subdirectory(utfcpp) add_subdirectory(imgui) add_subdirectory(tracy) +add_subdirectory(libstud-uuid) if (NOT LINUX) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/deps) diff --git a/3rdParty/libstud-uuid/CMakeLists.txt b/3rdParty/libstud-uuid/CMakeLists.txt new file mode 100644 index 0000000..e3396b9 --- /dev/null +++ b/3rdParty/libstud-uuid/CMakeLists.txt @@ -0,0 +1,10 @@ +include(FetchContent) + +FetchContent_Declare( + libstud-uuid + EXCLUDE_FROM_ALL + GIT_REPOSITORY https://github.com/GeorgH93/libstud-uuid.git + GIT_SHALLOW TRUE +) + +FetchContent_MakeAvailable(libstud-uuid) diff --git a/3rdParty/yaml-cpp/CMakeLists.txt b/3rdParty/yaml-cpp/CMakeLists.txt index ea4cb02..9aa7d5a 100644 --- a/3rdParty/yaml-cpp/CMakeLists.txt +++ b/3rdParty/yaml-cpp/CMakeLists.txt @@ -4,7 +4,7 @@ FetchContent_Declare( yaml-cpp EXCLUDE_FROM_ALL GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git - GIT_TAG yaml-cpp-0.6.3 + GIT_TAG 0.8.0 GIT_SHALLOW TRUE ) set(YAML_CPP_BUILD_TOOLS OFF) diff --git a/CMakeLists.txt b/CMakeLists.txt index e34f090..df87da0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,13 +137,11 @@ endif() if (NOT ANDROID AND NOT IOS) Find_Package(OpenCV) Find_Package(libjpeg-turbo) - Find_Package(Open3D) target_include_directories(openVulkanoCpp PRIVATE ${OpenCV_INCLUDE_DIRS}) target_link_libraries(openVulkanoCpp PRIVATE glfw ${OpenCV_LIBS} pugixml) if (libjpeg-turbo_FOUND) target_link_libraries(openVulkanoCpp PRIVATE libjpeg-turbo::turbojpeg) endif() - target_link_libraries(openVulkanoCpp PRIVATE Open3D::Open3D) target_link_libraries(openVulkanoCpp PRIVATE assimp) add_compile_definitions(GLM_FORCE_AVX2) target_link_libraries(openVulkanoCpp PRIVATE ftxui::screen ftxui::dom ftxui::component) @@ -166,7 +164,7 @@ find_package(LibArchive REQUIRED) set(ZLIB_USE_STATIC_LIBS ON) find_package(ZLIB REQUIRED) target_include_directories(openVulkanoCpp PRIVATE ${LibArchive_INCLUDE_DIR}) -target_link_libraries(openVulkanoCpp PRIVATE magic_enum yaml-cpp spdlog glm pugixml ${LibArchive_LIBRARIES} ${ZLIB_LIBRARIES} stb eigen utf8cpp imgui_internal TracyClient) +target_link_libraries(openVulkanoCpp PRIVATE magic_enum yaml-cpp spdlog glm pugixml ${LibArchive_LIBRARIES} ${ZLIB_LIBRARIES} stb eigen utf8cpp imgui_internal TracyClient stud-uuid) add_compile_definitions(GLM_FORCE_INTRINSICS) add_compile_definitions(GLM_FORCE_SILENT_WARNINGS) diff --git a/openVulkanoCpp/IO/Archive/MultiPartArchiveWriter.cpp b/openVulkanoCpp/IO/Archive/MultiPartArchiveWriter.cpp index 063670c..d42d3b8 100644 --- a/openVulkanoCpp/IO/Archive/MultiPartArchiveWriter.cpp +++ b/openVulkanoCpp/IO/Archive/MultiPartArchiveWriter.cpp @@ -28,7 +28,7 @@ namespace openVulkanoCpp MultiPartArchiveWriter::~MultiPartArchiveWriter() { - bool deleteLast = m_writer->GetTotalWrittenBytes() == 0; + bool deleteLast = m_writer && m_writer->GetTotalWrittenBytes() == 0; m_writer = nullptr; if (deleteLast) std::filesystem::remove(m_archives.back()); }