CMake: how to determine all the .DLL/.SO files that are need for an executable?

Let's assume my program needs several DLL's to work. I should provide that DLLs to the user in my distribution. For now I need QtCore4.DLL, QtGui4.DLL, msvcp90.DLL, msvcr90.DLL, mylib.DLL, Kernel32.DLL...

Would be nice if CMake could get full list of DLLs (or .SO) files. Then I would remove items like "Kernel32.DLL" from that list and copy the DLLs to my distribution.

I can't guarantee the next build will be done on the same version of the Visual Studio, so hard-coding paths like "C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT" or "E:\Qt\4.6.3" is not good for searching for the DLLs.

Thank you!

8
задан Phonon 11 May 2011 в 21:43
поделиться