[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Fwd: [CMake] Re: FindSDL.cmake and mingw / msys
From:       "PA Galmes" <pagalmes.lists () gmail ! com>
Date:       2007-03-31 14:07:52
Message-ID: a8f7e8520703310707s67a2065ehb76b44487bb521a () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

---------- Forwarded message ----------
From: PA Galmes <pagalmes.lists@gmail.com>
Date: Mar 31, 2007 4:07 PM
Subject: Re: [CMake] Re: FindSDL.cmake and mingw / msys
To: "E. Wing" <ewmailing@gmail.com>



On 3/28/07, E. Wing <ewmailing@gmail.com> wrote:
>
>
> So I'm concerned about breaking backwards compatibility. I think the
> public variables exported are the same ones that have been in use
> before I started mucking with things.


I agree, backward compatibility is something really important.
Thus, users of the new CMake shoudln't need to change their
existing scripts. That means we shouln't change the behavior
of exiting variables. But we can create new ones!


SDL_LIBRARY_FLAGS is an interesting idea, but the backwards
> compatibility thing bothers me here.


Maybe this could be implemented in a major release of CMake, thus
developers would be aware that changes are required to their scripts.
As soon as it is advertized enought, it's ok.


As for CMakeSetup requiring
> values, isn't it already the case that none of these values are
> actually required anyway?


Isn't that a function of the REQUIRED
> parameter of the FIND_PACKAGE command and not the FindSDL script
> itself. My expectation is that SDL_LIBRARY_TEMP would complain in this
> case.


Currenly, under Windows, when I click on the configure button in CMAKE, it
says:

- I did not found "qmake.exe",
- so I set the value for the QMAKE_EXECUTABE variable,
- click on configure one more time.

- It says, "I did not found SDLMAIN_INCLUDE, SDLMAIN_LIBRARY,
SDLIMAGE_INCLUDE, SDLIMAGE_LIBRARY"
- I set those variables,
- click on configure one more time.

...

And then the "Ok" button is not greyed anymore, so I can finish the setup.

To me, the fact that it asks for the variables means they are "required".
Thus, once I set all the "required" variables, things should compile.

Instead of all of this, what if we simply renamed SDL_LIBRARY_TEMP to
> SDL_LIBRARY_BOOTSTRAP or PUT_SDL_LIBRARY_HERE and just document that
> the user must fill the value if not found.
>

And what about calling that variable SDL_LIBRARY_DIR (with
for example the value "c:\My project\lib") and deducing from
that all the other variables.

I think that the name SDL_LIBRARY_DIR is clearer than
SDL_LIBRARY_BOOTSTRAP or PUT_SDL_LIBRARY_HERE ;-)


To conclude, we would have:

SDLMAIN_INCLUDE,
SDLMAIN_LIBRARY,
SDL_LIBRARY_DIR

Then the user would declare:

find_package(SDL REQUIRED)
INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
LINK_LIBRARIES(${SDL_LIBRARY} ${SDLMAIN_LIBRARY})

And that's it !

What do you think ?

BTW, why can't we just ask for:

- SDL_INCLUDE
- SDL_LIBRARY_DIR

instead of the the other variables ?

Note:

You should check that link also (and the answer in english):
http://www.c-plusplus.net/forum/viewtopic-var-t-is-162085.html
I had the same issue, and found the answer reading the article.

I think some more documentatation should be added,
because if you search on google for "findSDL" or
"find_package(SDL REQUIRED)" you won't find what
you are looking for.


Regards,
-- 
Pierre-André Galmes
Free Software consultant
StarXpert - www.starxpert.fr
6, rue Eugène Varlin - 75010 Paris


-- 
Pierre-André Galmes
Free Software consultant
StarXpert - www.starxpert.fr
6, rue Eugène Varlin - 75010 Paris

[Attachment #3 (text/html)]

<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



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic