(build): tests are relatives to last cmake project call
Summary
When using sight as a dependency, unit-tests of the projects are generated relatives to the last project()
function call.
Since function project()
is used in initProject
macro, this leads to have a bin directory in each target that has unit-test.
Furthermore, in SightConfig.cmake safe-xvfb-run
is copied each time a find_package(Sight...)
is called, some path are also appended multiple times.
Steps to reproduce
Use the latest dev branch of sight in a project and try to generate a unit-test.
Relevant logs and/or screenshots
unit-test is generated in libs/<lib name>/bin
instead of ./bin
[38/38] 100% 16.785s Creating executable symlink libs/io/robotics/bin/io_roboticsDetailTest.bin
Possible fixes
Don't use ${PROJECT_BINARY_DIR}
, and replace it by ${CMAKE_BINARY_DIR}