Commit 68c6b134 authored by Benjamin Eikel's avatar Benjamin Eikel Committed by Brad King

FindSDL: Stay compatible with old input variables

Suggested-by: David Cole's avatarDavid Cole <david.cole@kitware.com>
parent 9ed24c53
......@@ -32,6 +32,10 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(NOT SDL_IMAGE_INCLUDE_DIR AND SDLIMAGE_INCLUDE_DIR)
set(SDL_IMAGE_INCLUDE_DIR ${SDLIMAGE_INCLUDE_DIR} CACHE PATH "directory cache
entry initialized from old variable name")
endif()
find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h
HINTS
ENV SDLIMAGEDIR
......@@ -39,6 +43,10 @@ find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h
PATH_SUFFIXES SDL SDL12 SDL11
)
if(NOT SDL_IMAGE_LIBRARY AND SDLIMAGE_LIBRARY)
set(SDL_IMAGE_LIBRARY ${SDLIMAGE_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
endif()
find_library(SDL_IMAGE_LIBRARY
NAMES SDL_image
HINTS
......
......@@ -32,6 +32,10 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(NOT SDL_MIXER_INCLUDE_DIR AND SDLMIXER_INCLUDE_DIR)
set(SDL_MIXER_INCLUDE_DIR ${SDLMIXER_INCLUDE_DIR} CACHE PATH "directory cache
entry initialized from old variable name")
endif()
find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h
HINTS
ENV SDLMIXERDIR
......@@ -39,6 +43,10 @@ find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h
PATH_SUFFIXES SDL SDL12 SDL11
)
if(NOT SDL_MIXER_LIBRARY AND SDLMIXER_LIBRARY)
set(SDL_MIXER_LIBRARY ${SDLMIXER_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
endif()
find_library(SDL_MIXER_LIBRARY
NAMES SDL_mixer
HINTS
......
......@@ -32,6 +32,10 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(NOT SDL_NET_INCLUDE_DIR AND SDLNET_INCLUDE_DIR)
set(SDL_NET_INCLUDE_DIR ${SDLNET_INCLUDE_DIR} CACHE PATH "directory cache
entry initialized from old variable name")
endif()
find_path(SDL_NET_INCLUDE_DIR SDL_net.h
HINTS
ENV SDLNETDIR
......@@ -39,6 +43,10 @@ find_path(SDL_NET_INCLUDE_DIR SDL_net.h
PATH_SUFFIXES SDL SDL12 SDL11
)
if(NOT SDL_NET_LIBRARY AND SDLNET_LIBRARY)
set(SDL_NET_LIBRARY ${SDLNET_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
endif()
find_library(SDL_NET_LIBRARY
NAMES SDL_net
HINTS
......
......@@ -32,6 +32,10 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
if(NOT SDL_TTF_INCLUDE_DIR AND SDLTTF_INCLUDE_DIR)
set(SDL_TTF_INCLUDE_DIR ${SDLTTF_INCLUDE_DIR} CACHE PATH "directory cache
entry initialized from old variable name")
endif()
find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h
HINTS
ENV SDLTTFDIR
......@@ -39,6 +43,10 @@ find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h
PATH_SUFFIXES SDL SDL12 SDL11
)
if(NOT SDL_TTF_LIBRARY AND SDLTTF_LIBRARY)
set(SDL_TTF_LIBRARY ${SDLTTF_LIBRARY} CACHE FILEPATH "file cache entry
initialized from old variable name")
endif()
find_library(SDL_TTF_LIBRARY
NAMES SDL_ttf
HINTS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment