build: simplify management of dependencies on object libraries in CMake `gtest` function
requested to merge simplify-management-of-object-target-dependencies-in-cmake-gtest-function into develop
This commits changes the gtest
function to target_add_libraries
library object targets ${lib}
directly instead of
$<TARGET_OBJECTS:${lib}>
. As a consequence, the
target_include_directories
from the object target ${lib}
are
also passed to the target to compile and including them in the caller of
gtest
is not needed anymore.