I'm looking for a way in meson to get either the found library name and path, or in the case the library was not found the output path where the wrapped subproject for that dependency will be built. As a specfic example, the line:
sdl2_dep = dependency('SDL2', version: '>=2', required: true, fallback: ['sdl2', 'sdl2_dep'])
Yields sdl2_dep, which I understand to be a "Dependency object". From this, I would like to derive the location/name of the found library file, or if the dependency was not found and will be built as a subproject the location/name of the library file that will be generated.
The specific reason that I need this is that when cross-compiling I need to copy the library and put it next to the binary in order to easily run it for testing. Currently I'm manually copying it but that's inconvenient (and possibly in the future would make CI integration difficult).
*Note: I'm sure there must be some reference to the composition of the dependency object being returned by the dependency() method, but I can't seem to find it. If someone can point to the documentation it would be very much appreciated.