--- test/CMakeLists.txt.orig	2021-10-18 16:59:30 UTC
+++ test/CMakeLists.txt
@@ -17,8 +17,8 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR
 
     enable_testing()
 
-    find_package(xtensor REQUIRED CONFIG)
-    set(XTENSOR_INCLUDE_DIR ${xtensor_INCLUDE_DIRS})
+    #find_package(xtensor REQUIRED CONFIG)
+    #set(XTENSOR_INCLUDE_DIR ${xtensor_INCLUDE_DIRS})
 endif ()
 
 if(NOT CMAKE_BUILD_TYPE)
@@ -272,7 +272,7 @@ foreach(filename IN LISTS COMMON_BASE XTENSOR_TESTS)
         target_compile_definitions(${targetname} PRIVATE XTENSOR_USE_OPENMP)
     endif()
     target_include_directories(${targetname} PRIVATE ${XTENSOR_INCLUDE_DIR})
-    target_link_libraries(${targetname} PRIVATE xtensor doctest::doctest ${CMAKE_THREAD_LIBS_INIT})
+    target_link_libraries(${targetname} PRIVATE doctest::doctest ${CMAKE_THREAD_LIBS_INIT})
     add_custom_target(
         x${targetname}
         COMMAND ${targetname}
@@ -298,7 +298,7 @@ if(XTENSOR_USE_OPENMP)
 endif()
 
 target_include_directories(test_xtensor_lib PRIVATE ${XTENSOR_INCLUDE_DIR})
-target_link_libraries(test_xtensor_lib PRIVATE xtensor  doctest::doctest ${CMAKE_THREAD_LIBS_INIT})
+target_link_libraries(test_xtensor_lib PRIVATE doctest::doctest ${CMAKE_THREAD_LIBS_INIT})
 
 add_custom_target(xtest COMMAND test_xtensor_lib DEPENDS test_xtensor_lib)
 add_test(NAME xtest COMMAND test_xtensor_lib)
@@ -309,5 +309,5 @@ add_test(NAME xtest COMMAND test_xtensor_lib)
 add_library(test_xtensor_core_lib ${COMMON_BASE} ${TEST_HEADERS} ${XTENSOR_HEADERS})
 target_include_directories(test_xtensor_core_lib PRIVATE ${XTENSOR_INCLUDE_DIR})
 
-target_link_libraries(test_xtensor_core_lib PRIVATE xtensor doctest::doctest ${CMAKE_THREAD_LIBS_INIT})
+target_link_libraries(test_xtensor_core_lib PRIVATE GTest::GTest GTest::Main ${CMAKE_THREAD_LIBS_INIT})
 add_custom_target(coverity COMMAND coverity_scan DEPENDS test_xtensor_core_lib)
