<div class="gmail_quote">On Fri, Dec 18, 2009 at 3:09 AM, Eric Noulard <span dir="ltr"><<a href="mailto:eric.noulard@gmail.com">eric.noulard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2009/12/18 James Zipperer <<a href="mailto:james.zipperer@modsystems.com">james.zipperer@modsystems.com</a>>:<br>
<div class="im">> After a lot of trial and error and some rtfm work, I figured out a way to<br>
> do it. The UpgradeDLL macro I mentioned below appears to be out of date and<br>
> the preferred method is now InstallLib. It appears to handle DLL versioning<br>
> and usage counting. Note: I could be wrong, I’ve been at this problem for<br>
> about a day now.<br>
><br>
><br>
><br>
> Here’s the hack solution I came up with:<br>
><br>
><br>
><br>
> 1. Modify <a href="http://NSIS.template.in" target="_blank">NSIS.template.in</a> to include Library.nsh:<br>
<br>
</div>I would say that if you have a specific behavior which is not configurable<br>
with the CMake provided <a href="http://NSIS.template.in" target="_blank">NSIS.template.in</a><br>
you'll better craft your own <a href="http://NSIS.template.in" target="_blank">NSIS.template.in</a><br>
which may contain as much specificities as you need.<br>
<br>
I mean not only adding "include Library.nsh" but whatever<br>
other NSIS installer code you need.<br>
<br>
Then after that if the "install driver DLL" thing is of general<br>
interest may be you can report a bug and propose a generic<br>
modification of the mainstream <a href="http://NSIS.template.in" target="_blank">NSIS.template.in</a> provided with cmake.<br></blockquote><div><br></div><div><br></div><div>See my note attached to this bug for a way to use your own override of the <a href="http://NSIS.template.in">NSIS.template.in</a> file. (So you can do it on a per-project basis rather than modifying the main one in the CMake installation...)</div>
<div><br></div><div><a href="http://public.kitware.com/Bug/view.php?id=9148">http://public.kitware.com/Bug/view.php?id=9148</a><br></div><div><br></div><div>Note copy/pasted here to save you the hunting time:</div><div><div>
<br></div><div>Make your own copy of the <a href="http://NSIS.template.in">NSIS.template.in</a> file</div><div>Put it in a directory named "${CMAKE_CURRENT_SOURCE_DIR}/CMake"</div><div>Make edits to your own <a href="http://NSIS.template.in">NSIS.template.in</a> file as needed</div>
<div>Put this in your CMakeLists.txt file:</div><div>set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})</div><div><br></div><div>Voila.</div><div><br></div><div>CPack will now use your <a href="http://NSIS.template.in">NSIS.template.in</a> file instead of the built-in one.</div>
</div><div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div></div>