<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 10, 2014 at 2:14 AM, Tim Blechmann <span dir="ltr"><<a href="mailto:tim@klingt.org" target="_blank">tim@klingt.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> This sounds more like an install phase... to bring the whole package<br>
> together in one appropriate place.<br>
><br>
> if( WIN32 )<br>
> INSTALL( TARGET <target> RUNTIME DESTINATION bin LIBRARY DESTINATION bin<br>
> ARCHIVE DESTINATION lib )<br>
> else( WIN32 )<br>
> INSTALL( TARGET <target> RUNTIME DESTINATION bin LIBRARY DESTINATION lib<br>
> ARCHIVE DESTINATION lib )<br>
> endif( WIN32 )<br>
<br>
</span>on unixy platforms, shared libraries can be resolved using rpaths. on<br>
windows this is not the case: if you link a dll into an executable the<br>
executable will not run, unless the dll can be resolved at startup time.<br>
the is typically done by placing he dll next to the exe.<br>
<br>
the install step is a possible workaround, but in my experience this<br>
implies that you have to run the install script in order to debug the<br>
binary, which is pretty inconvenient.<br>
<span class=""><br></span></blockquote><div>No more inconvenient than building any other target... from the command line cmake --build . <--target install / instead of blank>; or 'make install' instead of 'make'</div><div>click and build in a gui environment; again not a big issue... and can just select that as the default target anyway... again just a modification to workflow.  If it was a base library everything will be rebuilt appropriately and nothing more or less.. just one extra copy step that's pretty quick... and even that only copies what it needs to.</div><div>So I don't know why you would attribute that as a negative 'pretty inconvenient' when it's really just a thing that just is... nature of the beast </div><div> </div><div>although now that you mention it; it would be nice to define install as the default 'all' project.  Or do something really rude that would make every target depend on install such that building a sub-executable would still trigger the install script phase.</div></div></div></div>