Merge pull request #1556 from jbo-85/master

Fix search paths in FindSDL2.cmake to find SDL2 built from source
This commit is contained in:
scrawl 2017-11-20 23:27:51 +00:00 committed by GitHub
commit e840c4352f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,10 +70,10 @@ endif()
libfind_pkg_detect(SDL2 sdl2
FIND_PATH SDL.h
HINTS $ENV{SDL2DIR}
PATH_SUFFIXES include SDL2
PATH_SUFFIXES include SDL2 include/SDL2
FIND_LIBRARY SDL2
HINTS $ENV{SDL2DIR}
PATH_SUFFIXES ${_sdl_lib_suffix}
PATH_SUFFIXES lib ${_sdl_lib_suffix}
)
libfind_version_n_header(SDL2 NAMES SDL_version.h DEFINES SDL_MAJOR_VERSION SDL_MINOR_VERSION SDL_PATCHLEVEL)
@ -85,7 +85,7 @@ IF(NOT SDL2_BUILDING_LIBRARY AND NOT APPLE)
libfind_pkg_detect(SDL2MAIN sdl2
FIND_LIBRARY SDL2main
HINTS $ENV{SDL2DIR}
PATH_SUFFIXES ${_sdl_lib_suffix}
PATH_SUFFIXES lib ${_sdl_lib_suffix}
)
set(SDL2MAIN_FIND_QUIETLY TRUE)
libfind_process(SDL2MAIN)