Browse Source

modules: FindSDL2.cmake cleanup.

pull/107/head
Vladimír Vondruš 11 years ago
parent
commit
326d1d6a98
  1. 10
      modules/FindSDL2.cmake

10
modules/FindSDL2.cmake

@ -35,11 +35,11 @@
# In Emscripten SDL is linked automatically, thus no need to find the library. # In Emscripten SDL is linked automatically, thus no need to find the library.
# Also the includes are in SDL subdirectory, not SDL2. # Also the includes are in SDL subdirectory, not SDL2.
if(CORRADE_TARGET_EMSCRIPTEN) if(CORRADE_TARGET_EMSCRIPTEN)
set(PATH_SUFFIXES SDL) set(_SDL2_PATH_SUFFIXES SDL)
else() else()
find_library(SDL2_LIBRARY SDL2) find_library(SDL2_LIBRARY SDL2)
set(SDL2_LIBRARY_NEEDED SDL2_LIBRARY) set(SDL2_LIBRARY_NEEDED SDL2_LIBRARY)
set(PATH_SUFFIXES SDL2) set(_SDL2_PATH_SUFFIXES SDL2)
endif() endif()
# Include dir # Include dir
@ -52,11 +52,9 @@ find_path(SDL2_INCLUDE_DIR
# this issue), but rather SDL2.framework/Headers/SDL.h, CMake might find # this issue), but rather SDL2.framework/Headers/SDL.h, CMake might find
# SDL.framework/Headers/SDL.h if SDL1 is installed, which is wrong. # SDL.framework/Headers/SDL.h if SDL1 is installed, which is wrong.
NAMES SDL_scancode.h NAMES SDL_scancode.h
PATH_SUFFIXES ${PATH_SUFFIXES} PATH_SUFFIXES ${_SDL2_PATH_SUFFIXES})
)
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args("SDL2" DEFAULT_MSG find_package_handle_standard_args("SDL2" DEFAULT_MSG
${SDL2_LIBRARY_NEEDED} ${SDL2_LIBRARY_NEEDED}
SDL2_INCLUDE_DIR SDL2_INCLUDE_DIR)
)

Loading…
Cancel
Save