When “installing” a shared library target, is there a special way to declare the resulting .so/.dll path.
So far I manage it like my static libraries and, at least on windows/mingw/make, my client code using the dll compiles but when I try to execute it, It crashes with a dll-no-found error.
My workaround is to add the .so/.dll directory to the user path but its not practical if I install each .so/.dll in its own dir.
Is there another way or the solution is to pack all my produced .so/.dll into a single directory (/usr/lib, or a single custom directory added to system path) ?
NB By “installing” I mean creating a MyTargetConfig.cmake file and MyTargetTargetsxxx.cmake files
PS I realize that I will need a way to distinguish between the different configurations (debug/release) of the shared library, issue that does not exist with static lib as I can use different paths for different configurations. How to be sure that, say, client.exe in debug will use the debug version of MyLib.so/.dll and the release on will use the release version.
I’m currently failing to find a tutorial that covers completely these questions