1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-17 01:10:10 +00:00

Fix search paths in FindSDL2.cmake to find SDL2 built from source

This commit is contained in:
jbo-85 2017-11-19 11:56:24 +01:00
parent 36f4f0ef85
commit f896c9acb6

View File

@ -70,10 +70,10 @@ endif()
libfind_pkg_detect(SDL2 sdl2 libfind_pkg_detect(SDL2 sdl2
FIND_PATH SDL.h FIND_PATH SDL.h
HINTS $ENV{SDL2DIR} HINTS $ENV{SDL2DIR}
PATH_SUFFIXES include SDL2 PATH_SUFFIXES include SDL2 include/SDL2
FIND_LIBRARY SDL2 FIND_LIBRARY SDL2
HINTS $ENV{SDL2DIR} 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) 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 libfind_pkg_detect(SDL2MAIN sdl2
FIND_LIBRARY SDL2main FIND_LIBRARY SDL2main
HINTS $ENV{SDL2DIR} HINTS $ENV{SDL2DIR}
PATH_SUFFIXES ${_sdl_lib_suffix} PATH_SUFFIXES lib ${_sdl_lib_suffix}
) )
set(SDL2MAIN_FIND_QUIETLY TRUE) set(SDL2MAIN_FIND_QUIETLY TRUE)
libfind_process(SDL2MAIN) libfind_process(SDL2MAIN)