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>2022-04-06 23:25:40 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-04-07 20:52:53 +0300
commit0de0950ad5d1de5172cbd2b6b0e67fe319a420c1 (patch)
tree54a1a3e8abdb9733f5f9287496d03515c9ff5987 /intern/cycles/cmake/macros.cmake
parent51a7e4b488a4df1ce6fec93ee599d70efdbf5e03 (diff)
Cycles: various Linux build fixes related to Hydra render delegate
* Add missing GLEW and hgiGL libraries for Hydra * Fix wrong case sensitive include * Fix link errors by adding external libs to static Hydra lib * Work around weird Hydra link error with MAX_SAMPLES * Use Embree by default for Hydra * Sync external libs code with standalone * Update version number to match Blender * Remove unneeded CLEW/GLEW from test executable None of this should affect Cycles in Blender. Ref T96731
Diffstat (limited to 'intern/cycles/cmake/macros.cmake')
-rw-r--r--intern/cycles/cmake/macros.cmake41
1 files changed, 25 insertions, 16 deletions
diff --git a/intern/cycles/cmake/macros.cmake b/intern/cycles/cmake/macros.cmake
index 7c14fd87518..cd1db8e95a9 100644
--- a/intern/cycles/cmake/macros.cmake
+++ b/intern/cycles/cmake/macros.cmake
@@ -73,30 +73,39 @@ macro(cycles_add_library target library_deps)
cycles_set_solution_folder(${target})
endmacro()
-macro(cycles_target_link_libraries target)
+macro(cycles_external_libraries_append libraries)
if(WITH_CYCLES_LOGGING)
- target_link_libraries(${target} ${GLOG_LIBRARIES} ${GFLAGS_LIBRARIES})
+ list(APPEND ${libraries} ${GLOG_LIBRARIES} ${GFLAGS_LIBRARIES})
endif()
if(WITH_CYCLES_OSL)
- target_link_libraries(${target} ${OSL_LIBRARIES} ${LLVM_LIBRARY})
+ list(APPEND ${libraries} ${OSL_LIBRARIES} ${CLANG_LIBRARIES} ${LLVM_LIBRARY})
endif()
if(WITH_CYCLES_EMBREE)
- target_link_libraries(${target} ${EMBREE_LIBRARIES})
+ list(APPEND ${libraries} ${EMBREE_LIBRARIES})
endif()
if(WITH_OPENSUBDIV)
- target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
+ list(APPEND ${libraries} ${OPENSUBDIV_LIBRARIES})
endif()
if(WITH_OPENCOLORIO)
- target_link_libraries(${target} ${OPENCOLORIO_LIBRARIES})
+ list(APPEND ${libraries} ${OPENCOLORIO_LIBRARIES})
+ if(APPLE)
+ list(APPEND ${libraries} "-framework IOKit")
+ endif()
endif()
if(WITH_OPENVDB)
- target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${BLOSC_LIBRARIES})
+ list(APPEND ${libraries} ${OPENVDB_LIBRARIES} ${BLOSC_LIBRARIES})
endif()
if(WITH_OPENIMAGEDENOISE)
- target_link_libraries(${target} ${OPENIMAGEDENOISE_LIBRARIES})
+ list(APPEND ${libraries} ${OPENIMAGEDENOISE_LIBRARIES})
+ if(APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
+ list(APPEND ${libraries} "-framework Accelerate")
+ endif()
endif()
- target_link_libraries(
- ${target}
+ if(WITH_ALEMBIC)
+ list(APPEND ${libraries} ${ALEMBIC_LIBRARIES})
+ endif()
+
+ list(APPEND ${libraries}
${OPENIMAGEIO_LIBRARIES}
${PNG_LIBRARIES}
${JPEG_LIBRARIES}
@@ -115,26 +124,26 @@ macro(cycles_target_link_libraries target)
if(WITH_CYCLES_DEVICE_CUDA OR WITH_CYCLES_DEVICE_OPTIX)
if(WITH_CUDA_DYNLOAD)
- target_link_libraries(${target} extern_cuew)
+ list(APPEND ${libraries} extern_cuew)
else()
- target_link_libraries(${target} ${CUDA_CUDA_LIBRARY})
+ list(APPEND ${libraries} ${CUDA_CUDA_LIBRARY})
endif()
endif()
if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
- target_link_libraries(${target} extern_hipew)
+ list(APPEND ${libraries} extern_hipew)
endif()
if(UNIX AND NOT APPLE)
if(CYCLES_STANDALONE_REPOSITORY)
- target_link_libraries(${target} extern_libc_compat)
+ list(APPEND ${libraries} extern_libc_compat)
else()
- target_link_libraries(${target} bf_intern_libc_compat)
+ list(APPEND ${libraries} bf_intern_libc_compat)
endif()
endif()
if(NOT CYCLES_STANDALONE_REPOSITORY)
- target_link_libraries(${target} bf_intern_guardedalloc)
+ list(APPEND ${libraries} bf_intern_guardedalloc)
endif()
endmacro()