From 205254150ae261051ac2e2f3b83e1bc90c042dc3 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 7 Dec 2021 19:51:39 +0100 Subject: Build: don't look for CUDA toolkit if not using Cycles CUDA device --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3eacc0d76e4..59d07fd1a74 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -851,7 +851,7 @@ if(WITH_AUDASPACE) endif() # Auto-enable CUDA dynload if toolkit is not found. -if(NOT WITH_CUDA_DYNLOAD) +if(WITH_CYCLES AND WITH_CYCLES_DEVICE_CUDA AND NOT WITH_CUDA_DYNLOAD) find_package(CUDA) if(NOT CUDA_FOUND) message(STATUS "CUDA toolkit not found, using dynamic runtime loading of libraries (WITH_CUDA_DYNLOAD) instead") -- cgit v1.2.3