[CMake] Find SDL

Benjamin Eikel cmake at eikel.org
Mon Aug 25 08:34:14 EDT 2014


Hello Christer,

Zitat von Christer Solskogen <christer.solskogen at gmail.com>:

> Hi!
>
> I have a cross compiler, installed into /opt/cross, which is  
> compiled by me. This cross compiler (gcc) is sysroot aware, which  
> means that every header and library is installed into  
> /opt/cross/<target>.
>
> In order to get cmake to find SDL (both SDL1 and SDL2) I need to  
> specify SDLDIR. The project I'm using (called hatari, a Atari ST(e)  
> emulator) is also using other libraries like readline and png, which  
> cmake have no problem finding.
>
> Is this a bug in cmake? Right now the cmake version I'm using is  
> 2.8.12.2, but this problem have been there since I can remember.

in order to help you, I need more information. If I understand you  
correctly, you do not want to set the environment variable SDLDIR.  
Instead, you expect the FindSDL module to find SDL without that  
information. Is that correct?
Please give some more information about your installation. In which  
path exactly is SDL located (where is "SDL.h", where is "libSDL.a" or  
"libSDL.so")?

Kind regards
Benjamin


More information about the CMake mailing list