author Sam Lantinga <>
Mon, 29 Jun 2015 22:24:00 -0700
changeset 9785 6e87ae760e6d
child 9978 a80ea42a4adc
permissions -rw-r--r--
Fixed bug 2464 - Configure a together with Leonardo Despite having a CMakeLists.txt file, SDL2 seems to be mainly built using the autotools system by package-managers. It is nice to have it but it is only useful if you are building SDL2 by yourself. People that want to use CMake to find their already-installed SDL2 are using a FindSDL2.cmake module based on the old FindSDL.cmake. This is not deprecated but it is discouraged by the CMake devs (see, as these modules needs maintainers to be included in the official CMake installation. To fix that, SDL and its accompanying libraries could configure a simple sdl2-config.cmake file, much like it does with We don't need to configure a full sdl2-config.cmake as in this post, (because it depends on it being built with CMake). Using something as simple as is deemed enough. Here is another:

# sdl2 cmake project-config input for ./configure scripts

set(prefix "@prefix@") 
set(exec_prefix "@exec_prefix@")
set(libdir "@libdir")
set(SDL2_PREFIX "@prefix@")
set(SDL2_EXEC_PREFIX "@prefix@")
set(SDL2_LIBDIR "@libdir@")
set(SDL2_INCLUDE_DIRS "@includedir@/SDL2")