diff --git a/modules/FindSDL2.cmake b/modules/FindSDL2.cmake index a7557baa2..e4d7bfdd9 100644 --- a/modules/FindSDL2.cmake +++ b/modules/FindSDL2.cmake @@ -35,11 +35,11 @@ # In Emscripten SDL is linked automatically, thus no need to find the library. # Also the includes are in SDL subdirectory, not SDL2. if(CORRADE_TARGET_EMSCRIPTEN) - set(PATH_SUFFIXES SDL) + set(_SDL2_PATH_SUFFIXES SDL) else() find_library(SDL2_LIBRARY SDL2) set(SDL2_LIBRARY_NEEDED SDL2_LIBRARY) - set(PATH_SUFFIXES SDL2) + set(_SDL2_PATH_SUFFIXES SDL2) endif() # Include dir @@ -52,11 +52,9 @@ find_path(SDL2_INCLUDE_DIR # 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} -) + PATH_SUFFIXES ${_SDL2_PATH_SUFFIXES}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args("SDL2" DEFAULT_MSG ${SDL2_LIBRARY_NEEDED} - SDL2_INCLUDE_DIR -) + SDL2_INCLUDE_DIR)