macOS/GTests: add_dependencies to fix build error

When building `install`, linking blender_test fails because
test libraries do not exist. This happened on lite + Xcode. Error in
{rBdcb2821292f962951e88f146cb304160f21f73da}.

Reviewed By: #platform_macos, brecht
Differential Revision: https://developer.blender.org/D10607
This commit is contained in:
Ankit Meel 2021-03-04 08:04:17 +05:30
parent e4a55b46c4
commit 67856d8c4a
1 changed files with 1 additions and 0 deletions

View File

@ -82,6 +82,7 @@ elseif(APPLE)
# are used as dependencies of other test libraries.
foreach(_lib ${_test_libs})
list(REMOVE_ITEM _test_libs_dependencies ${_lib})
add_dependencies(blender_test ${_lib})
target_link_options(blender_test PRIVATE "LINKER:-force_load,$<TARGET_FILE:${_lib}>")
endforeach()