mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-12-28 21:55:11 +00:00
bf9bd59c01
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 http://www.cmake.org/Bug/view.php?id=14826), 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 sdl2.pc.in. We don't need to configure a full sdl2-config.cmake as in this post, http://forums.libsdl.org/viewtopic.php?t=10068&sid=ccf8abbf0d73fb03ae9cded991e60959 (because it depends on it being built with CMake). Using something as simple as http://www.cmake.org/Wiki/CMake/Tutorials/Packaging#Package_Configuration_Files is deemed enough. Here is another: http://quickgit.kde.org/?p=prison.git&a=blob&f=lib%2Fprison%2FPrisonConfig.cmake.in
11 lines
336 B
CMake
11 lines
336 B
CMake
# 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")
|
|
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} @SDL_RLD_FLAGS@ @SDL_LIBS@")
|