[CMake] Find SDL
Christer Solskogen
christer.solskogen at gmail.com
Tue Aug 26 08:06:35 EDT 2014
Benjamin Eikel <cmake at ...> writes:
>
> Hello Christer,
>
> Zitat von Christer Solskogen <christer.solskogen at ...>:
>
> > 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?
Yes, that is 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")?
>
They are cross compiled for Windows (mingw-w64) which means that they have
different names (libSDL.dll.a for instance) but they are installed in
/opt/cross-mingw-w64/x86_64-w64-mingw32/{include,lib}.
x86_64-w64-mingw32-gcc is using /home/solskogen/obj/cross-mingw-w64 as
sysroot.
cmake have no trouble finding png or zlib.
-- Found ZLIB: /opt/cross-mingw-w64/x86_64-w64-mingw32/lib/libz.a (found
version "1.2.8")
-- Found PNG: /opt/cross-mingw-w64/x86_64-w64-mingw32/lib/libpng.a (found
version "1.6.12")
--
chs
More information about the CMake
mailing list