CMake with libsdl2, FindSDL2.cmake

I was wondering whether or not there is a standard a FindSDL2.cmake script for CMake that someone has found or made. I’ve found several for SDL <= 1.2, but have been having trouble finding newer ones.

Thanks,
Chris Covert

Editing the v1.2 version for v2 works for me ™:

Regards,
AndreOn Tue, Aug 14, 2012 at 2:43 AM, Christopher Covert wrote:

I was wondering whether or not there is a standard a FindSDL2.cmake script for CMake that someone has found or made. I’ve found several for SDL <= 1.2, but have been having trouble finding newer ones.

Another option would be to use pkgconfig, although not quite sure how
this will perform on non-Unixish environments:

Regards,

KaiOn Wed, Aug 15, 2012 at 11:44 AM, Andre Heider <a.heider at gmail.com> wrote:

On Tue, Aug 14, 2012 at 2:43 AM, Christopher Covert wrote:

I was wondering whether or not there is a standard a FindSDL2.cmake script for CMake that someone has found or made. I’ve found several for SDL <= 1.2, but have been having trouble finding newer ones.

Editing the v1.2 version for v2 works for me ™:
https://github.com/dhewm/dhewm3/commit/5639720c1c0021737dfe7c83fcab892cca49fb7f