diff --git a/cmake/gtest.cmake b/cmake/gtest.cmake index 5562380cae..cf516d6d53 100644 --- a/cmake/gtest.cmake +++ b/cmake/gtest.cmake @@ -32,9 +32,9 @@ else() "GTEST_CREATE_SHARED_LIBRARY=1" ) - if (protobuf_INSTALL) - set(protobuf_INSTALL_TESTS ON) - endif() + endif() + if (protobuf_INSTALL) + set(protobuf_INSTALL_TESTS ON) endif() target_link_libraries(gmock ${CMAKE_THREAD_LIBS_INIT})