Allow mock building with tests disabled
When we disable tests we still want to build mocks, since they can be used by other consumers.
This MR also prevents us leaking our install targets and unit test binaries to other projects when we are consumed as a sub-project.