From 17d758b36d8c9919d42d27162f6125e21b0a9b56 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 12 Feb 2024 13:28:07 -0500 Subject: FindCUDAToolkit: Fix cuda driver dependencies Fixes: #25665 --- Modules/FindCUDAToolkit.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index 1eaf36b..2229de6 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -1137,9 +1137,6 @@ if(CUDAToolkit_FOUND) target_link_directories(CUDA::toolkit INTERFACE "${CUDAToolkit_LIBRARY_DIR}") endif() - _CUDAToolkit_find_and_add_import_lib(cuda_driver ALT cuda) - - # setup dependencies that are required for cudart/cudart_static when building # on linux. These are generally only required when using the CUDA toolkit # when CUDA language is disabled @@ -1162,6 +1159,7 @@ if(CUDAToolkit_FOUND) endif() endif() + _CUDAToolkit_find_and_add_import_lib(cuda_driver ALT cuda DEPS cudart_static_deps) _CUDAToolkit_find_and_add_import_lib(cudart DEPS cudart_static_deps) _CUDAToolkit_find_and_add_import_lib(cudart_static DEPS cudart_static_deps) -- cgit v0.12