On Wed, Oct 29, 2008 at 11:34 AM, Christopher Harvey <span dir="ltr">&lt;<a href="mailto:chris@basementcode.com">chris@basementcode.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi list,<br>
I just tried FindSDL today. Works great under linux, however under<br>
windows it doesn&#39;t seem to do anything at all. My SDL library is<br>
installed in a non-standard location (is there a standard location on<br>
windows?)<br>
<br>
Here is my CMakeLists.txt layout:<br>
<br>
FIND_PACKAGE(SDL)<br>
...<br>
...<br>
IF(SDL_FOUND)<br>
 &nbsp;ADD_SUBDIRECTORY(exmapleApp)<br>
ENDIF(SDL_FOUND)<br>
<br>
<br>
So naturally under windows FIND_PACKAGE fails, no problem there.<br>
I was surprised to see that &nbsp;even if I filled out the SDL path<br>
information in the GUI configuration program and ran configure again<br>
that the project still remained excluded from the project. Is there a<br>
way to let the user help find sdl, then configure so that the exampleApp<br>
is included in the build?</blockquote><div><br>You can provide a cache variable for the end user and then abuse CMAKE_PREFIX_PATH to suggest a location to find the SDL.<br><br>set(SDL_ROOT &quot;&quot; CACHE PATH &quot;The location of the SDL install prefix (only used if the SDL is not yet found)&quot;)<br>
if(SDL_ROOT)<br>&nbsp;&nbsp; set(CMAKE_PREFIX_PATH ${SDL_ROOT})<br>endif()<br>FIND_PACKAGE(SDL)<br></div></div><br clear="all"><br>-- <br>Philip Lowman<br>