From e7d7cc1f9817727fb02eb96c29fe9c80e3e3fc5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 25 Dec 2013 13:28:30 +0100 Subject: [PATCH] modules: added comment explaining include path issues with SDL1/OSX. --- modules/FindSDL2.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/FindSDL2.cmake b/modules/FindSDL2.cmake index a50ab39c7..49734c560 100644 --- a/modules/FindSDL2.cmake +++ b/modules/FindSDL2.cmake @@ -43,6 +43,13 @@ endif() # Include dir find_path(SDL2_INCLUDE_DIR + # We must search file which is present only in SDL2 and not in SDL1. + # Apparently when both SDL.h and SDL_scancode.h are specified, CMake is + # happy enough that it found SDL.h and doesn't bother about the other. + # + # On OSX, where the includes are not in SDL2/SDL.h form (which would solve + # this issue), but rather SDL2.framework/Headers/SDL.h, CMake might find + # SDL.framework/Headers/SDL.h if SDL1 is installed, which is wrong. NAMES SDL_scancode.h PATH_SUFFIXES ${PATH_SUFFIXES} )