diff --git a/cmake/KokkosKernelsConfig.cmake.in b/cmake/KokkosKernelsConfig.cmake.in index 9b649d26c6..3c0d5859bf 100644 --- a/cmake/KokkosKernelsConfig.cmake.in +++ b/cmake/KokkosKernelsConfig.cmake.in @@ -7,7 +7,9 @@ include(CMakeFindDependencyMacro) @KOKKOSKERNELS_TPL_EXPORTS@ -find_dependency(Kokkos HINTS @Kokkos_DIR@) +IF(NOT Kokkos_FOUND) + find_dependency(Kokkos HINTS @Kokkos_DIR@) +ENDIF() INCLUDE("${KokkosKernels_CMAKE_DIR}/KokkosKernelsTargets.cmake")