Lets say I have two shared Libraries A, B and an Executable E.
E depends on B and B depends on A: E -> B -> A
Now assume that A and B are imported shared library targets that have their IMPORTED_LOCATION properly set. Is it somehow possible to copy the dll’s, whose paths are saved in the IMPORTED_LOCATION target properties of A and B, to the output directory of E?
Or do I have to retreat to using file(GET_RUNTIME_DEPENDENCIES) to solve this problem? The difficulty with file(GET_RUNTIME_DEPENDENCIES) is that I’m using hunter package manager to retrieve A and B, so the corresponding dll’s are saved in quite random locations…
I always thought that with an imported shared library on a DLL platform, IMPORTED_LOCATION was supposed to refer to the .dll and IMPORTED_IMPLIB would point to the .lib. I have it set up this way in several projects, and it works. The docs seem to support this too.