diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5ebc1a6..f02c2bb 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,13 +1,10 @@ find_package(Threads REQUIRED) +find_package(GTest REQUIRED CONFIG) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) set(BUILD_MOCK ON CACHE BOOL "" FORCE) set(CMAKE_POLICY_DEFAULT_CMP0048 NEW) -add_subdirectory( - "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.10.0" - "${CMAKE_CURRENT_BINARY_DIR}/prefix") - include_directories(SYSTEM "${CMAKE_CURRENT_SOURCE_DIR}/gtest-1.10.0/googletest/include") set(test-new-api-pattern "new-api/*.cpp") @@ -38,7 +35,7 @@ target_link_libraries(yaml-cpp-tests PRIVATE Threads::Threads yaml-cpp - gmock) + GTest::gmock) set_property(TARGET yaml-cpp-tests PROPERTY CXX_STANDARD_REQUIRED ON) if (NOT DEFINED CMAKE_CXX_STANDARD)