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/cmake
parente45ffce5fadd55ebead3fd1a89964f330baac526 (diff)
Fix build without Cycles HIP device
Diffstat (limited to 'intern/cycles/cmake')
-rw-r--r--intern/cycles/cmake/external_libs.cmake7
-rw-r--r--intern/cycles/cmake/macros.cmake12
2 files changed, 13 insertions, 6 deletions
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index 5653f51ec05..b966edd4298 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -531,8 +531,13 @@ if(WITH_CYCLES_CUDA_BINARIES OR NOT WITH_CUDA_DYNLOAD)
endif()
endif()
endif()
+
+
+###########################################################################
+# HIP
+###########################################################################
+
if(NOT WITH_HIP_DYNLOAD)
- message(STATUS "Setting up HIP Dynamic Load")
set(WITH_HIP_DYNLOAD ON)
endif()
diff --git a/intern/cycles/cmake/macros.cmake b/intern/cycles/cmake/macros.cmake
index 172ae280cea..a470fb9c574 100644
--- a/intern/cycles/cmake/macros.cmake
+++ b/intern/cycles/cmake/macros.cmake
@@ -156,13 +156,15 @@ macro(cycles_target_link_libraries target)
${PLATFORM_LINKLIBS}
)
- if(WITH_CUDA_DYNLOAD)
- target_link_libraries(${target} extern_cuew)
- else()
- target_link_libraries(${target} ${CUDA_CUDA_LIBRARY})
+ if(WITH_CYCLES_DEVICE_CUDA OR WITH_CYCLES_DEVICE_OPTIX)
+ if(WITH_CUDA_DYNLOAD)
+ target_link_libraries(${target} extern_cuew)
+ else()
+ target_link_libraries(${target} ${CUDA_CUDA_LIBRARY})
+ endif()
endif()
- if(WITH_HIP_DYNLOAD)
+ if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
target_link_libraries(${target} extern_hipew)
endif()