CMake-based library building does not take BOB_PREFIX_PATH with priority

This one is hard to reproduce. You basically need to have two environments with pre-compiled binaries (which is easy to obtain with conda create --clone btw) to reproduce the issue. This example is a bit contrived, but shows the problem:

  • /path/to/env/1
  • /path/to/env/2

Suppose, for instance, env/1 is a clone of env/2. The python distribution is taken from env/1 where all externals are installed. Now I set BOB_PREFIX_PATH to env/2. I'd then expect all libraries produced by the build will be linked against the copies in env/2.

This happens OK for the libraries produced through Python, since our file finding utils (in bob.extension.utils) will do their magic, but that is not happening for CMake-based libraries (all libbob_xyz.so). Is there a way to make it happen?