summaryrefslogtreecommitdiff
path: root/Modules/FindGTest.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindGTest.cmake')
-rw-r--r--Modules/FindGTest.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake
index 60bb401032..92334e44e8 100644
--- a/Modules/FindGTest.cmake
+++ b/Modules/FindGTest.cmake
@@ -314,7 +314,7 @@ if(GTest_FOUND)
__gtest_define_backwards_compatible_library_targets()
endif()
-if(GMock_FOUND)
+if(GMock_FOUND AND GTest_FOUND)
if(NOT TARGET GTest::gmock)
__gtest_determine_library_type(GMOCK_LIBRARY)
add_library(GTest::gmock ${GMOCK_LIBRARY_TYPE} IMPORTED)