diff --git a/drape/drape_tests/CMakeLists.txt b/drape/drape_tests/CMakeLists.txt index 377426e8cd..aa22c2ac88 100644 --- a/drape/drape_tests/CMakeLists.txt +++ b/drape/drape_tests/CMakeLists.txt @@ -31,7 +31,10 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE GTEST_DONT_DEFINE_TEST WITH_GL_MOCK ) -if (NOT WITH_SYSTEM_PROVIDED_3PARTY) +if (WITH_SYSTEM_PROVIDED_3PARTY) + find_package(GTest REQUIRED) + target_link_libraries(${PROJECT_NAME} GTest::gtest) +else() add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../../3party/googletest" "${CMAKE_CURRENT_BINARY_DIR}/googletest") endif()