<div dir="ltr"><div style>If shared libraries on Windows are truly shared, then why so many applications carry their own copies of that same Qt and Python? Examples from my own Program Files: Anki, Blender, Mixxx, Mumble, TortoiseHg.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 4, 2013 at 2:15 PM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com" target="_blank">themiwi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi<br><div><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Mon, Feb 4, 2013 at 12:43 PM, Ansis Māliņš <span dir="ltr"><<a href="mailto:ansis.malins@gmail.com" target="_blank">ansis.malins@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'm just learning CMake and posting questions in this mailing list, but the answers I get only confuse me. It seems I must take a step back and ask more general questions.<div>
<br></div><div>In Linux there is a package for everything, so you just find_package whatever you need.</div>
<div><br></div><div>But on Windows most libraries exist only as zip files that you're supposed to unpack right in your build environment and ship them together with the executable. (Basically, in practice, there is no such thing as shared libraries in Windows - nothing for find_package to find.)</div>
</div></blockquote><div><br></div></div><div>What then are DLL's? They are the shared libraries of the Windows world. True, the semantics are a bit different, but they are dynamically linked. It's also not true that on Windows everything is a "zip files that you're supposed to unpack right in your build environment". If you don't believe me, try to take a look at Qt or Python.<br>
</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<div><br></div><div>So how am I supposed to write portable CMake scripts in face of this?</div></div></blockquote><div><br><br></div></div><div> Often the Windows packages are installed into a few well known locations, or even better, create a registry key containing installation information which you then can use to find the software in your CMake code. Also, for SDL I would recommend to use the FindSDL.cmake module (not sure whether that works with SDL2, though), and only if that fails, to resort to ExternalProject. It is good practice to offer the user the choice which way should be used through a cached variable.<br>
<br></div><div>HTH<span class="HOEnZb"><font color="#888888"><br><br>Michael<br></font></span></div></div></div></div></div>
</blockquote></div><br></div>