[SDL] Building with cmake

E. Wing ewmailing at gmail.com
Sat Mar 3 17:34:56 PST 2007


You need to use the variable ${} syntax when appropriate, as in ${SDL_LIBRARY}.


On 3/3/07, Dan <dan.newmarch at gmail.com> wrote:
> E. Wing <ewmailing <at> gmail.com> writes:
> >
> > My finger prints are all over the FindSDL module. What platform are
> > you on, what are the file name of your SDL library, and where on your
> > system are they located?
> >
> > -Eric
> >
> > On 3/3/07, Dan <dan.newmarch <at> gmail.com> wrote:
> > > I was wondering if anybody is successfully using cmake to build projects
> > > using
> > > sdl, I've been investigating it but am running into problems of limited
> > > documentation.  I'm trying to use it for a project that I've previously
> > > compiled
> > > under linux (Ubuntu 6.10) and windows xp, but I can't seem to get the
> cmake
> > > file
> > > to find sdl.  Here's what I'm using:
> > >
> > > PROJECT(DT)
> > > INCLUDE(FindSDL)
> > > INCLUDE(FindOpenGL)
> > >
> > > IF(SDL_FOUND)
> > > 	MESSAGE("SDL Found")
> > > 	INCLUDE_DIRECTORIES(SDL_INCLUDE_DIR)
> > > ELSE(SDL_FOUND)
> > > 	MESSAGE("SDL not found")
> > > ENDIF(SDL_FOUND)
> > >
> > > ADD_EXECUTABLE(dt DTpath.cpp DT.cpp)
> > >
> > > I haven't got as far as telling it to link against the opengl and sdl
> libs
> > > yet,
> > > becuase it says it can't find sdl.
> > > If anybody has any helpful suggestions regarding this issue I'd be
> grateful
> > > for
> > > the assistance.
> > > Regards,
> > > Dan
> > >
> > > _______________________________________________
> > > SDL mailing list
> > > SDL <at> lists.libsdl.org
> > > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> > >
> >
>
> Hi Eric,
> Thanks for replying so quickly, as it turns out, SDL wasn't even installed,
> I
> was just coming back to post an apology.  I forgot that I had done a system
> reinstall since I last compiled the code I'm working on, and hadn't
> installed
> the sdl-dev packages yet.
>
> I do have a follow up question though, because while it's adding the sdl
> include
> path properly now, when I try to link against it using
> TARGET_LINK_LIBRARIES(dt m SDL_LIBRARY OPENGL_LIBRARIES)
> the linker fails saying it can't find -lSDL_LIBRARY.
> If your questions are still relevant, I'm using ubuntu 6.10, I've just
> installed
> the repo packages so it's version 1.2.10, the headers are located
> /usr/include/SDL and the libraries are located in /usr/lib
> Thanks for the help,
> Dan
>
>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>


More information about the SDL mailing list