diff --unified --recursive --text --new-file snappy-1.2.1.orig/CMakeLists.txt snappy-1.2.1/CMakeLists.txt
--- snappy-1.2.1.orig/CMakeLists.txt	2024-09-25 22:35:44.563365640 +0200
+++ snappy-1.2.1/CMakeLists.txt	2024-09-25 22:40:22.273395168 +0200
@@ -331,19 +331,18 @@
   set(install_gmock OFF)
   set(build_gmock ON)
 
-  # This project is tested using GoogleTest.
-  add_subdirectory("third_party/googletest")
+  find_package(GTest REQUIRED)
 
   # GoogleTest triggers a missing field initializers warning.
   if(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
-    set_property(TARGET gtest
+    set_property(TARGET GTest::gtest
         APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
-    set_property(TARGET gmock
+    set_property(TARGET GTest::gmock
         APPEND PROPERTY COMPILE_OPTIONS -Wno-missing-field-initializers)
   endif(SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS)
 
   if(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
-    set_property(TARGET gtest
+    set_property(TARGET GTest::gtest
         APPEND PROPERTY COMPILE_OPTIONS -Wno-implicit-int-float-conversion)
   endif(SNAPPY_HAVE_NO_IMPLICIT_INT_FLOAT_CONVERSION)
 
