diff --git a/.gitmodules b/.gitmodules index 59ccffc..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +0,0 @@ -[submodule "ext/glfw"] - path = ext/glfw - url = https://github.com/glfw/glfw -[submodule "ext/Catch2"] - path = ext/Catch2 - url = https://github.com/catchorg/Catch2 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e042a1..f050e10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,7 @@ target_link_libraries(vk-bootstrap option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF) if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR VK_BOOTSTRAP_TEST) + add_subdirectory(ext) add_subdirectory(tests) add_subdirectory(example) diff --git a/ext/CMakeLists.txt b/ext/CMakeLists.txt index 4daea29..b6dcdd9 100644 --- a/ext/CMakeLists.txt +++ b/ext/CMakeLists.txt @@ -1,20 +1,28 @@ -set(GLFW_BUILD_TESTS - OFF - CACHE BOOL "" FORCE) -set(GLFW_BUILD_DOCS - OFF - CACHE BOOL "" FORCE) -set(GLFW_INSTALL - OFF - CACHE BOOL "" FORCE) -set(GLFW_BUILD_EXAMPLES - OFF - CACHE BOOL "" FORCE) -add_subdirectory(glfw) -set(CATCH_BUILD_TESTING OFF CACHE BOOL "" FORCE) -set(CATCH_ENABLE_WERROR OFF CACHE BOOL "" FORCE) -set(CATCH_INSTALL_DOCS OFF CACHE BOOL "" FORCE) -set(CATCH_INSTALL_HELPERS OFF CACHE BOOL "" FORCE) + +option(GLFW_BUILD_TESTS "" OFF) +option(GLFW_BUILD_DOCS "" OFF) +option(GLFW_INSTALL "" OFF) +option(GLFW_BUILD_EXAMPLES "" OFF) +#add_subdirectory(glfw) + +option(CATCH_BUILD_TESTING "" OFF) +option(CATCH_ENABLE_WERROR "" OFF) +option(CATCH_INSTALL_DOCS "" OFF) +option(CATCH_INSTALL_HELPERS "" OFF) set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) #remove Catch2 target spam -add_subdirectory(Catch2) \ No newline at end of file +#add_subdirectory(Catch2) + +include(FetchContent) +FetchContent_Declare( + glfw + GIT_REPOSITORY https://github.com/glfw/glfw + GIT_TAG 3.3.2 +) +FetchContent_MakeAvailable(glfw) +FetchContent_Declare( + Catch2 + GIT_REPOSITORY https://github.com/catchorg/Catch2 + GIT_TAG v2.12.2 +) +FetchContent_MakeAvailable(Catch2) diff --git a/ext/Catch2 b/ext/Catch2 deleted file mode 160000 index 2d172dc..0000000 --- a/ext/Catch2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2d172dc688ffab0867a94928159e93384475a870 diff --git a/ext/glfw b/ext/glfw deleted file mode 160000 index 0ac0133..0000000 --- a/ext/glfw +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0ac013381be83fcd6e53ea874f09b1895943bd9e