1

I am creating a shared library which I would like to work on Windows. When the user has installed to a specific prefix, the "bin" folder will contain the relevant .dll files.

My question is, should I expect the consumer of my library to copy these dll files to their build directory? Or should I copy the files for them? Or should they have to add the "bin" folder to their path? Or is there some sort of script I can run which can add this for them?

If so, whichever method is "most standard", how can I accomplish this in CMake?

I have noticed with Qt that in fact I am unable to run my program without either copying the relevant DLLs or adding "bin" to the path.

Gary Allen
  • 1,218
  • 1
  • 13
  • 28
  • FYI: [SO: How to copy DLL files into the same folder as the executable using CMake?](https://stackoverflow.com/a/10672739/7478597) Something like this is actually what we use in our productive code. [CMake install](https://cmake.org/cmake/help/latest/command/install.html) might be worth a look as well but I don't have any experience with it. – Scheff's Cat Oct 03 '21 at 09:44

0 Answers0