[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    [CMake] Abuse try_compile to get DLL dependencies for win32 NSIS packaging?
From:       Richard Shaw <hobbes1069 () gmail ! com>
Date:       2014-09-23 16:27:48
Message-ID: CAN3TeO2BxfuF8FiYPKq2Bi0Qz7ENePYt_CF8b1HteJ8vqQqAaw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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

[Attachment #5 (text/html)]

<div dir="ltr">Ok, this may or may not work but I figured it was worth a \
try.<div><br></div><div>I&#39;m running out of motivation to get a good method to \
determine which DLL&#39;s I need to package with the install(SCRIPT...) / \
GetPrerequisites mess.</div><div><br></div><div>My current approach is to attempt to \
use try_compile to build a minimal program I can link against and use  \
GetPrerequisites  with it.</div><div><br></div><div>  I crated an minimal do nothing \
c++ program and used the full linker flags for the main program but it appears that \
the &quot;-Wl,--no-whole-archive&quot; is &quot;helping&quot; me by not linking with \
things I don&#39;t need:</div><div><br></div><div><div>$ objdump -x getdeps.exe | \
grep &quot;DLL Name:&quot;</div><div>            DLL Name: KERNEL32.dll</div><div>    \
DLL Name: msvcrt.dll</div></div><div><br></div><div>Any \
ideas?</div><div><br></div><div>Thanks,</div><div>Richard</div></div>



-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic