From 03a9f219cca07bcfb08c495c8caba361d75a2ef5 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Tue, 28 Nov 2023 09:28:11 +0100 Subject: [PATCH] Update dependency management --- 3rdParty/CMakeLists.txt | 8 ++++---- 3rdParty/eigen/CMakeLists.txt | 6 +++--- 3rdParty/fmt/CMakeLists.txt | 14 ++++++++++++++ 3rdParty/glfw/CMakeLists.txt | 4 ++-- 3rdParty/glm/CMakeLists.txt | 2 +- 3rdParty/opencv/CMakeLists.txt | 1 + 3rdParty/pugixml/CMakeLists.txt | 4 ++-- 3rdParty/rapidyaml/CMakeLists.txt | 14 ++++++++++++++ 3rdParty/spdlog/CMakeLists.txt | 5 +++-- 3rdParty/utfcpp/CMakeLists.txt | 6 +++--- 3rdParty/yaml-cpp/CMakeLists.txt | 4 ++-- 11 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 3rdParty/fmt/CMakeLists.txt create mode 100644 3rdParty/rapidyaml/CMakeLists.txt diff --git a/3rdParty/CMakeLists.txt b/3rdParty/CMakeLists.txt index 0c31b4d..14be02a 100644 --- a/3rdParty/CMakeLists.txt +++ b/3rdParty/CMakeLists.txt @@ -3,10 +3,9 @@ if (NOT ANDROID AND NOT IOS) add_subdirectory(glfw) add_subdirectory(ftxui) endif() -if (NOT LINUX) - add_subdirectory(spdlog) - add_subdirectory(assimp) -endif() +add_subdirectory(fmt) +add_subdirectory(spdlog) +#add_subdirectory(assimp) add_subdirectory(yaml-cpp) add_subdirectory(magic-enum) add_subdirectory(pugixml) @@ -16,6 +15,7 @@ add_subdirectory(utfcpp) add_subdirectory(imgui) add_subdirectory(tracy) add_subdirectory(libstud-uuid) +add_subdirectory(rapidyaml) if (NOT LINUX) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/deps) diff --git a/3rdParty/eigen/CMakeLists.txt b/3rdParty/eigen/CMakeLists.txt index 3cb01cd..e8ebdf3 100644 --- a/3rdParty/eigen/CMakeLists.txt +++ b/3rdParty/eigen/CMakeLists.txt @@ -11,7 +11,7 @@ FetchContent_Declare( GIT_TAG master GIT_SHALLOW TRUE ) -set(EIGEN_BUILD_DOC OFF) -set(BUILD_TESTING OFF) -set(EIGEN_BUILD_PKGCONFIG OFF) +set(EIGEN_BUILD_DOC OFF CACHE BOOL "" FORCE) +set(BUILD_TESTING OFF CACHE BOOL "" FORCE) +set(EIGEN_BUILD_PKGCONFIG OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(eigen) diff --git a/3rdParty/fmt/CMakeLists.txt b/3rdParty/fmt/CMakeLists.txt new file mode 100644 index 0000000..d2f38c8 --- /dev/null +++ b/3rdParty/fmt/CMakeLists.txt @@ -0,0 +1,14 @@ +include(FetchContent) + +if(NOT DEFINED FMT_REPO) + set(FMT_REPO https://github.com/fmtlib/fmt) +endif () + +FetchContent_Declare( + fmt + EXCLUDE_FROM_ALL + GIT_REPOSITORY ${FMT_REPO} + GIT_TAG 10.1.0 + GIT_SHALLOW TRUE +) +FetchContent_MakeAvailable(fmt) diff --git a/3rdParty/glfw/CMakeLists.txt b/3rdParty/glfw/CMakeLists.txt index 86171ee..15ccd6c 100644 --- a/3rdParty/glfw/CMakeLists.txt +++ b/3rdParty/glfw/CMakeLists.txt @@ -11,6 +11,6 @@ FetchContent_Declare( GIT_TAG 3.3.8 GIT_SHALLOW TRUE ) -set(GLFW_BUILD_EXAMPLES OFF) -set(GLFW_BUILD_TESTS OFF) +set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) +set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(glfw) \ No newline at end of file diff --git a/3rdParty/glm/CMakeLists.txt b/3rdParty/glm/CMakeLists.txt index afe0807..42bbfa0 100644 --- a/3rdParty/glm/CMakeLists.txt +++ b/3rdParty/glm/CMakeLists.txt @@ -11,5 +11,5 @@ FetchContent_Declare( GIT_TAG 0.9.9.8 GIT_SHALLOW TRUE ) -set(GLM_TEST_ENABLE OFF) +set(GLM_TEST_ENABLE OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(glm) diff --git a/3rdParty/opencv/CMakeLists.txt b/3rdParty/opencv/CMakeLists.txt index 90983db..ca8c7c8 100644 --- a/3rdParty/opencv/CMakeLists.txt +++ b/3rdParty/opencv/CMakeLists.txt @@ -1,4 +1,5 @@ Find_Package(OpenCV) +include(FetchContent) if(NOT DEFINED OPENCV_REPO) set(OPENCV_REPO https://github.com/opencv/opencv.git) diff --git a/3rdParty/pugixml/CMakeLists.txt b/3rdParty/pugixml/CMakeLists.txt index 517122c..9541e97 100644 --- a/3rdParty/pugixml/CMakeLists.txt +++ b/3rdParty/pugixml/CMakeLists.txt @@ -11,6 +11,6 @@ FetchContent_Declare( GIT_TAG v1.14 GIT_SHALLOW TRUE ) -set(BUILD_SHARED_LIBS OFF) -set(PUGIXML_BUILD_TESTS OFF) +set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) +set(PUGIXML_BUILD_TESTS OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(pugixml) \ No newline at end of file diff --git a/3rdParty/rapidyaml/CMakeLists.txt b/3rdParty/rapidyaml/CMakeLists.txt new file mode 100644 index 0000000..aca7338 --- /dev/null +++ b/3rdParty/rapidyaml/CMakeLists.txt @@ -0,0 +1,14 @@ +include(FetchContent) + +if(NOT DEFINED RAPIDYAML_REPO) + set(RAPIDYAML_REPO https://github.com/biojppm/rapidyaml.git) +endif () + +FetchContent_Declare( + ryml + EXCLUDE_FROM_ALL + GIT_REPOSITORY ${RAPIDYAML_REPO} + GIT_TAG v0.6.0 + GIT_SHALLOW FALSE # ensure submodules are checked out +) +FetchContent_MakeAvailable(ryml) \ No newline at end of file diff --git a/3rdParty/spdlog/CMakeLists.txt b/3rdParty/spdlog/CMakeLists.txt index ce75979..e582f0e 100644 --- a/3rdParty/spdlog/CMakeLists.txt +++ b/3rdParty/spdlog/CMakeLists.txt @@ -8,8 +8,9 @@ FetchContent_Declare( spdlog EXCLUDE_FROM_ALL GIT_REPOSITORY ${SPDLOG_REPO} - GIT_TAG v1.10.0 + GIT_TAG v1.12.0 GIT_SHALLOW TRUE ) +option(SPDLOG_FMT_EXTERNAL "" ON) FetchContent_MakeAvailable(spdlog) -#add_definitions(-SPDLOG_FMT_EXTERNAL) \ No newline at end of file +#add_definitions(-DSPDLOG_FMT_EXTERNAL) \ No newline at end of file diff --git a/3rdParty/utfcpp/CMakeLists.txt b/3rdParty/utfcpp/CMakeLists.txt index 8f5b003..991767f 100644 --- a/3rdParty/utfcpp/CMakeLists.txt +++ b/3rdParty/utfcpp/CMakeLists.txt @@ -11,7 +11,7 @@ FetchContent_Declare( GIT_TAG v4.0.1 GIT_SHALLOW TRUE ) -set(UTF8_TESTS OFF) -set(UTF8_INSTALL OFF) -set(UTF8_SAMPLES OFF) +set(UTF8_TESTS OFF CACHE BOOL "" FORCE) +set(UTF8_INSTALL OFF CACHE BOOL "" FORCE) +set(UTF8_SAMPLES OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(utfcpp) diff --git a/3rdParty/yaml-cpp/CMakeLists.txt b/3rdParty/yaml-cpp/CMakeLists.txt index 2fdffde..076fc3d 100644 --- a/3rdParty/yaml-cpp/CMakeLists.txt +++ b/3rdParty/yaml-cpp/CMakeLists.txt @@ -11,6 +11,6 @@ FetchContent_Declare( GIT_TAG 0.8.0 GIT_SHALLOW TRUE ) -set(YAML_CPP_BUILD_TOOLS OFF) -set(YAML_CPP_BUILD_TESTS OFF) +set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "" FORCE) +set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(yaml-cpp) \ No newline at end of file