From 042df5fd6ad75868a93fbeff100c9d4eb7382e4d Mon Sep 17 00:00:00 2001 From: Stefan Werner Date: Mon, 3 May 2021 22:07:09 +0200 Subject: Cycles standalone: Fixed macOS dependencies. Added IOKit and Accerelate as linked frameworks where necessary. --- intern/cycles/app/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'intern') diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt index 67b852013f3..7a1e5d62dd2 100644 --- a/intern/cycles/app/CMakeLists.txt +++ b/intern/cycles/app/CMakeLists.txt @@ -71,6 +71,16 @@ if(WITH_CYCLES_STANDALONE) target_link_libraries(cycles ${LIBRARIES}) cycles_target_link_libraries(cycles) + if(APPLE) + if(WITH_OPENCOLORIO) + set_property(TARGET cycles APPEND_STRING PROPERTY LINK_FLAGS " -framework IOKit") + endif() + if(WITH_OPENIMAGEDENOISE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64") + # OpenImageDenoise uses BNNS from the Accelerate framework. + set_property(TARGET cycles APPEND_STRING PROPERTY LINK_FLAGS " -framework Accelerate") + endif() + endif() + if(UNIX AND NOT APPLE) set_target_properties(cycles PROPERTIES INSTALL_RPATH $ORIGIN/lib) endif() -- cgit v1.2.3