cmake/win: Allow running blender_test from the VS debugger

This was missing some paths setup in the environment, ctest
normally sets this up before running the tests from the CLI
but that does not help the IDE all that much.
This commit is contained in:
Ray molenkamp 2022-12-15 09:04:59 -07:00 committed by Hans Goudey
parent 1965e31d17
commit c30718ded9
1 changed files with 1 additions and 0 deletions

View File

@ -43,6 +43,7 @@ if(WIN32)
target_link_libraries(blender_test ${_lib})
target_link_options(blender_test PRIVATE /wholearchive:$<TARGET_FILE:${_lib}>)
endforeach()
set_target_properties(blender_test PROPERTIES VS_DEBUGGER_ENVIRONMENT "${PLATFORM_ENV_INSTALL};$<TARGET_FILE_DIR:blender>")
elseif(APPLE)
# force_load for `_test_libs` ensures that all symbols definitely make it into the test binary.
# But linking against them again using `target_link_libraries` creates duplicate symbol