<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
<br>
Did you try FixupBundle from the BundleUtilities module ?<br>
<br>
I use it on windows, at install time, to copy all the dll required
by an executable, just next to the executable.<br>
Very usefull to generate a standalone installer. The good thing is
that it introspects your executable (via the windows equivalent of
ldd), and copy all that is needed, and only what is needed.<br>
No need to maintain any list of DLL, they just need to be accessible
in the PATH at the time FixupBundle is called.<br>
<br>
I guess you can plug a call to it in a POST_BUILD step, and that it
would automatically copy the right flavor (debug/release) of DLL.<br>
<br>
Regards,<br>
Julien<br>
<br>
<br>
Le 09/01/2012 10:05, Michael Stürmer a écrit :
<blockquote cite="mid:e7367350.1cccead.3a58e9.29@pmdtec.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">I have found some topics
related to my issue on the web, but none so far helped me to
fix it:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I use Visual Studio 2010
on Windows 7 64Bit.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">During my build, all
binaries are collected in one folder, which makes it easier
for me to debug the project. But to be able to run the
program actually, I have to copy several dlls (like Qt,
openCV etc.) into the folder for the program to find them.
Putting the libraries in the system path is not an option
for me, as I switch between 32- and 64-bit on the same
system.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I managed to locate the
folder where the dlls are (using some CMake-Variables) and
using a custom command like<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">ADD_CUSTOM_COMMAND(
TARGET CopyDlls POST_BUILD<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> COMMAND
copy “${DLL_3RD}/*.dll”
“${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIGURATION>”<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> COMMENT
“copying dlls …”<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> )<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This copies ALL dlls
from the ${DLL_3RD} folder to the binary folder, for Qt that
would be the relase as well as the debug libraries.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Now my question:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I would like to only
copy those dlls I need, i.e. I have to determine somehow if
I’m in debug or release mode and select the appropriate
libraries by adding “d” for debug versions. For openCV I
need “opencv_core231.dll” in release and
“opencv_core231d.dll” in debug mode. Does anyone have a
solution/workaround/idea for this problem?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Michael<o:p></o:p></span></p>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
--
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
</blockquote>
</body>
</html>