de3c8a
diff --git a/CMakeLists.txt b/CMakeLists.txt
de3c8a
--- a/CMakeLists.txt
de3c8a
+++ b/CMakeLists.txt
de3c8a
@@ -212,7 +212,7 @@ if(SNAPPY_BUILD_TESTS)
de3c8a
       "snappy-test.cc"
de3c8a
   )
de3c8a
   target_compile_definitions(snappy_unittest PRIVATE -DHAVE_CONFIG_H)
de3c8a
-  target_link_libraries(snappy_unittest snappy ${GFLAGS_LIBRARIES})
de3c8a
+  target_link_libraries(snappy_unittest snappy ${GTEST_LIBRARIES} ${GFLAGS_LIBRARIES})
de3c8a
 
de3c8a
   if(HAVE_LIBZ)
de3c8a
     target_link_libraries(snappy_unittest z)