So, the project I am working on uses a non-system directory to keep some DLLs that the code uses. I don't want to put them in system directories, so the executables have an rpath set to find the DLLs. However, as more and more libraries are added, there are now DLLs that depend on other DLLs in that directory.
Those libraries cannot find the DLLs that they depend on, since they are not located in a directory that the linker is looking for, e.g. a system directory.
Is there a way to get the DLLs to search this specific non-system directory? Such as an rpath? And how is that done with a library? The build system being used for the project is CMake, if that assists in the answer.
This answer does not work, since there is no rPath tag in the library: https://unix.stackexchange.com/a/272286/4193
I have considered using
LD_LIBRARY_PATH, and that works, but it is annoying to type and not all that great to get other people to use the app. If there is a way to add the
rPath tag to the library, that would be the best option.
Pointers to previous relevant questions and answers appreciated.