diff --git a/.gitmodules b/.gitmodules index 2539f20c..b6273b6f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,6 @@ path = win32-deps url = https://github.com/visualboyadvance-m/win32-deps.git branch = master +[submodule "third_party/googletest"] + path = third_party/googletest + url = https://github.com/google/googletest.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 2416cede..b0d5584a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,14 +90,9 @@ endif() # Configure gtest if(BUILD_TESTING) - FetchContent_Declare(googletest - URL https://github.com/google/googletest/archive/2d16ed055d09c3689d44b272adc097393de948a0.zip - EXCLUDE_FROM_ALL - ) - set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) - FetchContent_MakeAvailable(googletest) - + set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) + add_subdirectory(./third_party/googletest) include(GoogleTest) endif() diff --git a/third_party/googletest b/third_party/googletest new file mode 160000 index 00000000..b514bdc8 --- /dev/null +++ b/third_party/googletest @@ -0,0 +1 @@ +Subproject commit b514bdc898e2951020cbdca1304b75f5950d1f59