[CMake] Abuse try_compile to get DLL dependencies for win32 NSIS packaging?
Richard Shaw
hobbes1069 at gmail.com
Tue Sep 23 12:27:48 EDT 2014
Ok, this may or may not work but I figured it was worth a try.
I'm running out of motivation to get a good method to determine which DLL's
I need to package with the install(SCRIPT...) / GetPrerequisites mess.
My current approach is to attempt to use try_compile to build a minimal
program I can link against and use GetPrerequisites with it.
I crated an minimal do nothing c++ program and used the full linker flags
for the main program but it appears that the "-Wl,--no-whole-archive" is
"helping" me by not linking with things I don't need:
$ objdump -x getdeps.exe | grep "DLL Name:"
DLL Name: KERNEL32.dll
DLL Name: msvcrt.dll
Any ideas?
Thanks,
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140923/6b2e5a7a/attachment.html>
More information about the CMake
mailing list