# HG changeset patch # User sheepluva # Date 1447175795 -3600 # Node ID 31570b766315e7b4658f384ec374ff02b8495fbf # Parent 7a7611adf7157ae5c7aa90381a9d4791074db79c drop FindSDL1or2 cmake module diff -r 7a7611adf715 -r 31570b766315 cmake_modules/FindSDL1or2.cmake --- a/cmake_modules/FindSDL1or2.cmake Tue Nov 10 17:45:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -find_package(SDL QUIET) - -if(NOT SDL_FOUND) - find_package(SDL2 REQUIRED) - set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIR}) - set(SDL_LIBRARY ${SDL2_LIBRARY}) -endif() - -if(NOT SDL_VERSION) - #find which version of SDL we have - find_file(sdlversion_h SDL_version.h ${SDL_INCLUDE_DIR}) - if(sdlversion_h) - file(STRINGS ${sdlversion_h} sdl_majorversion_tmp REGEX "SDL_MAJOR_VERSION[\t' ']+[0-9]+") - file(STRINGS ${sdlversion_h} sdl_minorversion_tmp REGEX "SDL_MINOR_VERSION[\t' ']+[0-9]+") - file(STRINGS ${sdlversion_h} sdl_patchversion_tmp REGEX "SDL_PATCHLEVEL[\t' ']+[0-9]+") - string(REGEX MATCH "([0-9]+)" sdl_majorversion "${sdl_majorversion_tmp}") - string(REGEX MATCH "([0-9]+)" sdl_minorversion "${sdl_minorversion_tmp}") - string(REGEX MATCH "([0-9]+)" sdl_patchversion "${sdl_patchversion_tmp}") - set(SDL_VERSION "${sdl_majorversion}.${sdl_minorversion}.${sdl_patchversion}") - endif() -endif() - -mark_as_advanced(sdlversion_h sdl_majorversion sdl_minorversion sdl_patchversion) -