GSoC/GCI Archive
Google Code-in 2012 Copyleft Games Group

Hedgewars: Create a FindSDL2 CMake module

completed by: Simone

mentors: Andrey Korotaev, Xeli, koda

Remember to join our IRC channel when working on this task! We are on #hedgewars at freenode.net. If you are new to IRC, read this tutorial from a past GCI participant.

Your task

CMake is our build structure: inside every CMakeLists.txt you can find a list of files to be compiled and a given set of options. Very powerful, opensource and crossplatform, visit www.cmake.org to read documentation.

One of the nice feature is CMake expansions, so that you can add modules when what your need is not yet supported mainstream. SDL2 has been introduced only recently and no modules are provided yet. Your task is to start from the original FindSDL.cmake and create one FindSDL2.cmake module for us (you'll find it in share/cmake-xxx/Modules/FindSDL.cmake).

Deliverable

A working patch, that applies cleanly to our source tree. This patch should be in the form of a pull from clone, hg export or unified diff format (in order of preference) implementing the functionality required.