diff --git a/CMakeLists.txt b/CMakeLists.txt index e11bd632..a89a4326 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,7 +124,7 @@ set_target_properties(phoenix # when building tests, create a test executable and load it into CTest if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) enable_testing() - include(vendor/doctest/scripts/cmake/doctest.cmake) + include(${doctest_SOURCE_DIR}/scripts/cmake/doctest.cmake) add_executable(phoenix-tests ${PHOENIX_TESTS}) target_link_libraries(phoenix-tests PRIVATE phoenix doctest_with_main) diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 4eb73ec5..3acd9240 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -2,12 +2,77 @@ include(FetchContent) option(BUILD_STATIC_LIBS ON) option(BUILD_SHARED_LIBS OFF) + + +# add doctest +FetchContent_Declare( + doctest + URL https://github.com/doctest/doctest/archive/refs/tags/v2.4.9.zip + URL_HASH SHA1=d1563419fa370c34c90e028c2e903a70c8dc07b2 +) + +if (NOT doctest_POPULATED) + message(STATUS "Downloading doctest") + FetchContent_Populate(doctest) + add_subdirectory(${doctest_SOURCE_DIR} ${doctest_BINARY_DIR}) +endif () + + +# add mio +FetchContent_Declare( + mio + URL https://github.com/mandreyel/mio/archive/3f86a95c0784d73ce6815237ec33ed25f233b643.zip + URL_HASH SHA1=62a0e43b07a6b66e415ad01f4b225c72a3c9935b +) + +if (NOT mio_POPULATED) + message(STATUS "Downloading mio") + FetchContent_Populate(mio) + add_subdirectory(${mio_SOURCE_DIR} ${mio_BINARY_DIR}) +endif () + + +# add lexy +FetchContent_Declare( + lexy + URL https://github.com/foonathan/lexy/releases/download/v2022.05.1/lexy-src.zip + URL_HASH SHA1=252185ebbf004047725f9ed98b4e8b6e4aa06d98 +) + +if (NOT lexy_POPULATED) + message(STATUS "Downloading lexy") + FetchContent_Populate(lexy) + add_subdirectory(${lexy_SOURCE_DIR} ${lexy_BINARY_DIR}) +endif () + + +# add fmt +FetchContent_Declare( + fmt + URL https://github.com/fmtlib/fmt/releases/download/9.1.0/fmt-9.1.0.zip + URL_HASH SHA1=8de922ba88fccaec1e7778bc069f342084573486 +) + +if (NOT fmt_POPULATED) + message(STATUS "Downloading fmt") + FetchContent_Populate(fmt) + add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR}) +endif () + + +# add glm +FetchContent_Declare( + glm + URL https://github.com/g-truc/glm/releases/download/0.9.9.8/glm-0.9.9.8.zip + URL_HASH SHA1=45408897f419944fb28d8fd835791f237be2ec19 +) + +if (NOT glm_POPULATED) + message(STATUS "Downloading glm") + FetchContent_Populate(glm) + add_subdirectory(${glm_SOURCE_DIR} ${glm_BINARY_DIR}) +endif () -add_subdirectory(glm) -add_subdirectory(fmt) -add_subdirectory(doctest) -add_subdirectory(mio) -add_subdirectory(lexy) # msvc: disable -wno-* flags if (NOT MSVC) @@ -22,6 +87,7 @@ FetchContent_Declare( ) if (NOT libsquish_POPULATED) + message(STATUS "Downloading squish") FetchContent_Populate(libsquish) SET(BUILD_SQUISH_WITH_OPENMP OFF CACHE BOOL "" FORCE) diff --git a/vendor/doctest b/vendor/doctest deleted file mode 160000 index bc548749..00000000 --- a/vendor/doctest +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bc5487492936487346fcd076062f987f61ba298d diff --git a/vendor/fmt b/vendor/fmt deleted file mode 160000 index 29c60001..00000000 --- a/vendor/fmt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 29c6000137dd94151b61e34fc9f658304878d71e diff --git a/vendor/glm b/vendor/glm deleted file mode 160000 index cc98465e..00000000 --- a/vendor/glm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cc98465e3508535ba8c7f6208df934c156a018dc diff --git a/vendor/lexy b/vendor/lexy deleted file mode 160000 index 5799f027..00000000 --- a/vendor/lexy +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5799f0278fa89dcd781ed404b998c7381573871b diff --git a/vendor/mio b/vendor/mio deleted file mode 160000 index 3f86a95c..00000000 --- a/vendor/mio +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3f86a95c0784d73ce6815237ec33ed25f233b643