Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-09-28 20:55:25 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-09-28 21:00:55 +0300
commit86ec9d79eca2a31044a5096df5d5ee244d15708d (patch)
treea33ea71034997d1137b8a43e4d90fc226b4e4315 /intern/cycles/device
parente45ffce5fadd55ebead3fd1a89964f330baac526 (diff)
Fix build without Cycles HIP device
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/CMakeLists.txt44
1 files changed, 24 insertions, 20 deletions
diff --git a/intern/cycles/device/CMakeLists.txt b/intern/cycles/device/CMakeLists.txt
index 9af68550d17..6d33a6f107f 100644
--- a/intern/cycles/device/CMakeLists.txt
+++ b/intern/cycles/device/CMakeLists.txt
@@ -22,19 +22,21 @@ set(INC_SYS
../../../extern/clew/include
)
-if(WITH_CUDA_DYNLOAD)
- list(APPEND INC
- ../../../extern/cuew/include
- )
- add_definitions(-DWITH_CUDA_DYNLOAD)
-else()
- list(APPEND INC_SYS
- ${CUDA_TOOLKIT_INCLUDE}
- )
- add_definitions(-DCYCLES_CUDA_NVCC_EXECUTABLE="${CUDA_NVCC_EXECUTABLE}")
+if(WITH_CYCLES_DEVICE_OPTIX OR WITH_CYCLES_DEVICE_CUDA)
+ if(WITH_CUDA_DYNLOAD)
+ list(APPEND INC
+ ../../../extern/cuew/include
+ )
+ add_definitions(-DWITH_CUDA_DYNLOAD)
+ else()
+ list(APPEND INC_SYS
+ ${CUDA_TOOLKIT_INCLUDE}
+ )
+ add_definitions(-DCYCLES_CUDA_NVCC_EXECUTABLE="${CUDA_NVCC_EXECUTABLE}")
+ endif()
endif()
-if(WITH_HIP_DYNLOAD)
+if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
list(APPEND INC
../../../extern/hipew/include
)
@@ -127,17 +129,19 @@ set(LIB
${CYCLES_GL_LIBRARIES}
)
-if(WITH_CUDA_DYNLOAD)
- list(APPEND LIB
- extern_cuew
- )
-else()
- list(APPEND LIB
- ${CUDA_CUDA_LIBRARY}
- )
+if(WITH_CYCLES_DEVICE_OPTIX OR WITH_CYCLES_DEVICE_CUDA)
+ if(WITH_CUDA_DYNLOAD)
+ list(APPEND LIB
+ extern_cuew
+ )
+ else()
+ list(APPEND LIB
+ ${CUDA_CUDA_LIBRARY}
+ )
+ endif()
endif()
-if(WITH_HIP_DYNLOAD)
+if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
list(APPEND LIB
extern_hipew
)