libtcod / python-tcod

A high-performance Python port of libtcod. Includes the libtcodpy module for backwards compatibility with older projects.
BSD 2-Clause "Simplified" License
410 stars 36 forks source link

Check all SDL2 include locations. #83

Closed pale-phosphorescence closed 5 years ago

pale-phosphorescence commented 5 years ago

On at least my FreeBSD 12 install, the sdl2-config command returns a string containing multiple -I values. The existing regex pulls out the last of these and assumes it's the right one; on my machine, we should actually be looking under the first one. By iterating over all the -I values the command returns, we can improve our confidence of actually finding the SDL2 headers.

HexDecimal commented 5 years ago

I never considered that there'd be extra includes in sdl2-config. I'm a little curious of what the extra includes were, but they're probably just some system headers needed by SDL's headers.

Thanks for making this pull request.

pale-phosphorescence commented 5 years ago

For the sake of completeness: $ sdl2-config --cflags -I/usr/local/include/SDL2 -I/usr/local/include -D_REENTRANT -D_THREAD_SAFE