From 7a376ea8fb46d328d8822e204b6b03b421f828bd Mon Sep 17 00:00:00 2001 From: Georg Hagen Date: Sun, 21 Jul 2024 12:37:25 +0200 Subject: [PATCH] Add units library --- .gitea/workflows/DependencyMirrors.txt | 4 +++- 3rdParty/units/CMakeLists.txt | 15 +++++++++++++++ CMakeLists.txt | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 3rdParty/units/CMakeLists.txt diff --git a/.gitea/workflows/DependencyMirrors.txt b/.gitea/workflows/DependencyMirrors.txt index 215e5a5..1b1164c 100644 --- a/.gitea/workflows/DependencyMirrors.txt +++ b/.gitea/workflows/DependencyMirrors.txt @@ -19,4 +19,6 @@ PUGIXML_REPO=https://git.madvoxel.net/Mirrors/pugixml.git YAMLCPP_REPO=https://git.madvoxel.net/Mirrors/yaml-cpp.git UTFCPP_REPO=https://git.madvoxel.net/Mirrors/utfcpp.git TRACY_REPO=https://git.madvoxel.net/Mirrors/tracy.git -STB_REPO=https://git.madvoxel.net/Mirrors/stb.git \ No newline at end of file +STB_REPO=https://git.madvoxel.net/Mirrors/stb.git +UNITS_REPO=https://git.madvoxel.net/Mirrors/units.git +ANKERLUD_REPO=https://git.madvoxel.net/Mirrors/ankerl_unordered_dense.git \ No newline at end of file diff --git a/3rdParty/units/CMakeLists.txt b/3rdParty/units/CMakeLists.txt new file mode 100644 index 0000000..6448fee --- /dev/null +++ b/3rdParty/units/CMakeLists.txt @@ -0,0 +1,15 @@ +include(FetchContent) + +if(NOT DEFINED UNITS_REPO) + set(UNITS_REPO https://github.com/nholthaus/units.git) +endif () + +FetchContent_Declare( + units + EXCLUDE_FROM_ALL + GIT_REPOSITORY ${UNITS_REPO} + GIT_TAG v2.3.3 + GIT_SHALLOW TRUE +) +FetchContent_MakeAvailable(units) + diff --git a/CMakeLists.txt b/CMakeLists.txt index 9cf720b..267085a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,7 +107,7 @@ endif() list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR}/deps/INSTALL) -target_link_libraries(openVulkanoCpp PRIVATE magic_enum yaml-cpp fmt spdlog glm pugixml stb eigen utf8cpp imgui_internal TracyClient stud-uuid ryml unordered_dense Boost::regex) +target_link_libraries(openVulkanoCpp PRIVATE magic_enum yaml-cpp fmt spdlog glm pugixml stb eigen utf8cpp imgui_internal TracyClient stud-uuid ryml unordered_dense Boost::regex units) LinkCurl(openVulkanoCpp) add_compile_definitions(LIBARCHIVE_STATIC)