diff options
-rw-r--r-- | CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
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") |