<br><br>---------- Forwarded message ----------<br><span class="gmail_quote">From: <b class="gmail_sendername">PA Galmes</b> &lt;<a href="mailto:pagalmes.lists@gmail.com">pagalmes.lists@gmail.com</a>&gt;<br>Date: Mar 31, 2007 4:07 PM
<br>Subject: Re: [CMake] Re: FindSDL.cmake and mingw / msys<br>To: &quot;E. Wing&quot; &lt;<a href="mailto:ewmailing@gmail.com">ewmailing@gmail.com</a>&gt;<br><br></span><br><br>
<div><span class="q"><span class="gmail_quote">On 3/28/07, <b class="gmail_sendername">E. Wing</b> &lt;<a href="mailto:ewmailing@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ewmailing@gmail.com
</a>&gt; wrote:
</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"><br>So I&#39;m concerned about breaking backwards compatibility. I think the<br>public variables exported are the same ones that have been in use
<br>before I started mucking with things.
</blockquote></span><div><br>I agree, backward compatibility is something really important.<br>Thus, users of the new CMake shoudln&#39;t need to change their <br>existing scripts. That means we shouln&#39;t change the behavior
<br>of exiting variables. But we can create new ones!<br></div><span class="q"><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">SDL_LIBRARY_FLAGS is an interesting idea, but the backwards
<br>compatibility thing bothers me here.</blockquote></span><div><br>Maybe this could be implemented in a major release of CMake, thus<br>developers would be aware that changes are required to their scripts.<br>As soon as it is advertized enought, it&#39;s ok.
<br></div><span class="q"><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;"> As for CMakeSetup requiring
<br>values, isn&#39;t it already the case that none of these values are<br>actually required anyway?</blockquote>
</span><div><span class="q"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">Isn&#39;t that a function of the REQUIRED<br>
parameter of the FIND_PACKAGE command and not the FindSDL script
  <br>
itself. My expectation is that SDL_LIBRARY_TEMP would complain in this<br>
case.</blockquote></span>
<br>Currenly, under Windows, when I click on the configure button in CMAKE, it says:<br><br>- I did not found &quot;qmake.exe&quot;,<br>- so I set the value for the QMAKE_EXECUTABE variable, <br>- click on configure one more time.
<br><br>- It says, &quot;I did not found SDLMAIN_INCLUDE, SDLMAIN_LIBRARY, SDLIMAGE_INCLUDE, SDLIMAGE_LIBRARY&quot;<br>- I set those variables,<br>- click on configure one more time.<br><br>...<br><br>And then the &quot;Ok&quot; button is not greyed anymore, so I can finish the setup.
<br><br>To me, the fact that it asks for the variables means they are &quot;required&quot;.<br>Thus, once I set all the &quot;required&quot; variables, things should compile.<span class="q"><br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">

Instead of all of this, what if we simply renamed SDL_LIBRARY_TEMP to<br>SDL_LIBRARY_BOOTSTRAP or PUT_SDL_LIBRARY_HERE and just document that<br>the user must fill the value if not found.<br></blockquote><div>&nbsp;</div></span>
And what about calling that variable SDL_LIBRARY_DIR (with
<br>for example the value &quot;c:\My project\lib&quot;) and deducing from<br>that all the other variables.<br>
<br>I think that the name SDL_LIBRARY_DIR is clearer than <br>SDL_LIBRARY_BOOTSTRAP or PUT_SDL_LIBRARY_HERE ;-)<br><br><br>To conclude, we would have:<br><br>SDLMAIN_INCLUDE,<br>SDLMAIN_LIBRARY,<br>SDL_LIBRARY_DIR<br><br>

Then the user would declare:<br><br>find_package(SDL REQUIRED)<span class="q"><br>
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})<br></span><div>LINK_LIBRARIES(${SDL_LIBRARY} ${SDLMAIN_LIBRARY})
</div>
<br>And that&#39;s it !<br><br>What do you think ?<br><br>BTW, why can&#39;t we just ask for: <br><br>- SDL_INCLUDE<br>- SDL_LIBRARY_DIR<br><br>instead of the the other variables ?<br><br>Note:<br><br>You should check that link also (and the answer in english):
<br><a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-162085.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.c-plusplus.net/forum/viewtopic-var-t-is-162085.html</a><br></div>

I had the same issue, and found the answer reading the article.<br><br>I think some more documentatation should be added,<br>because if you search on google for &quot;findSDL&quot; or <br>&quot;find_package(SDL REQUIRED)&quot; you won&#39;t find what
<br>you are looking for.<br><br></div><br clear="all">Regards,<div><span class="e" id="q_111a8528c5dfbd41_13"><br>-- <br>Pierre-André Galmes<br>Free Software consultant<br>StarXpert - <a href="http://www.starxpert.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">


www.starxpert.fr</a><br>6, rue Eugène Varlin - 75010 Paris 
</span></div><br clear="all"><br>-- <br>Pierre-André Galmes<br>Free Software consultant<br>StarXpert - <a href="http://www.starxpert.fr">www.starxpert.fr</a><br>6, rue Eugène Varlin - 75010 Paris