# HG changeset patch # User koda # Date 1327859521 -3600 # Node ID c7bf3b7c49dd49c32ecbe5412ef65212bf251905 # Parent 8fd6bb239a1e11a269440638124cdbaafb9e7f50 disabling the discovery of SDL13+ on desktop. SDL13 has become SDL2 with a completely different ABI and will require a new FindSDL2 module for Cmake to be found; for current sdl development installations, hedgewars will either use the compatibility layer (present in sdl1.3 but not in sdl2) or just fail to build (in case sdl2 is installed but sdl1.2.* is not). whew diff -r 8fd6bb239a1e -r c7bf3b7c49dd cmake_modules/FindSDL_Extras.cmake --- a/cmake_modules/FindSDL_Extras.cmake Sun Jan 29 02:48:03 2012 +0100 +++ b/cmake_modules/FindSDL_Extras.cmake Sun Jan 29 18:52:01 2012 +0100 @@ -1,21 +1,21 @@ #if the headers are not installed, the newer apis won't be activated -#find which version of SDL we are building against -find_file(sdl_h SDL_version.h ${SDL_INCLUDE_DIR}) -if(sdl_h) - file(STRINGS ${sdl_h} sdl_majorversion_tmp REGEX "SDL_MAJOR_VERSION[\t' ']+[0-9]+") - file(STRINGS ${sdl_h} sdl_minorversion_tmp REGEX "SDL_MINOR_VERSION[\t' ']+[0-9]+") - file(STRINGS ${sdl_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}") - math(EXPR sdl_version "${sdl_majorversion}*10000 + ${sdl_minorversion}*100 + ${sdl_patchversion}") - - if(NOT (sdl_version LESS "010300")) - message(STATUS "Enabling SDL-1.3+ calls") - set(pascal_compiler_flags_cmn "-dSDL13" ${pascal_compiler_flags_cmn}) - endif() -endif() +##find which version of SDL we are building against +#find_file(sdl_h SDL_version.h ${SDL_INCLUDE_DIR}) +#if(sdl_h) +# file(STRINGS ${sdl_h} sdl_majorversion_tmp REGEX "SDL_MAJOR_VERSION[\t' ']+[0-9]+") +# file(STRINGS ${sdl_h} sdl_minorversion_tmp REGEX "SDL_MINOR_VERSION[\t' ']+[0-9]+") +# file(STRINGS ${sdl_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}") +# math(EXPR sdl_version "${sdl_majorversion}*10000 + ${sdl_minorversion}*100 + ${sdl_patchversion}") +# +# if(NOT (sdl_version LESS "010300")) +# message(STATUS "Enabling SDL-1.3+ calls") +# set(pascal_compiler_flags_cmn "-dSDL13" ${pascal_compiler_flags_cmn}) +# endif() +#endif() #find which version of SDL_mixer we have (for Mix_Init) find_file(sdlmixer_h SDL_mixer.h ${SDLMIXER_INCLUDE_DIR})