diff options
author | Brad King <brad.king@kitware.com> | 2013-11-22 13:41:43 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-11-22 13:41:43 (GMT) |
commit | 7246e635fe8312206b62a279b3c237d1cf584c83 (patch) | |
tree | 3f95778fe2ad1ecb8d3af79421ce72429d09758f | |
parent | 1744ad9257c3b9fc5badc31d746acd8d2fa30f9e (diff) | |
parent | 9619719882935b9f5bed43079a1ac74f82c09ba1 (diff) | |
download | CMake-7246e635fe8312206b62a279b3c237d1cf584c83.zip CMake-7246e635fe8312206b62a279b3c237d1cf584c83.tar.gz CMake-7246e635fe8312206b62a279b3c237d1cf584c83.tar.bz2 |
Merge topic 'FixIssue14029'
9619719 FindSDL: Add additional search paths on MSVC (#14029)
-rw-r--r-- | Modules/FindSDL.cmake | 10 | ||||
-rw-r--r-- | Modules/FindSDL_image.cmake | 8 | ||||
-rw-r--r-- | Modules/FindSDL_mixer.cmake | 8 | ||||
-rw-r--r-- | Modules/FindSDL_net.cmake | 8 | ||||
-rw-r--r-- | Modules/FindSDL_sound.cmake | 2 | ||||
-rw-r--r-- | Modules/FindSDL_ttf.cmake | 8 |
6 files changed, 37 insertions, 7 deletions
diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake index 6d418fd..ec1f881 100644 --- a/Modules/FindSDL.cmake +++ b/Modules/FindSDL.cmake @@ -90,13 +90,19 @@ find_path(SDL_INCLUDE_DIR SDL.h include/SDL include/SDL12 include/SDL11 include ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(VC_LIB_PATH_SUFFIX lib/x64) +else() + set(VC_LIB_PATH_SUFFIX lib/x86) +endif() + # SDL-1.1 is the name used by FreeBSD ports... # don't confuse it for the version number. find_library(SDL_LIBRARY_TEMP NAMES SDL SDL-1.1 HINTS ENV SDLDIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX} ) if(NOT SDL_BUILDING_LIBRARY) @@ -109,7 +115,7 @@ if(NOT SDL_BUILDING_LIBRARY) NAMES SDLmain SDLmain-1.1 HINTS ENV SDLDIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX} PATHS /sw /opt/local diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake index 2ec6e50..e5173e3 100644 --- a/Modules/FindSDL_image.cmake +++ b/Modules/FindSDL_image.cmake @@ -57,6 +57,12 @@ find_path(SDL_IMAGE_INCLUDE_DIR SDL_image.h PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(VC_LIB_PATH_SUFFIX lib/x64) +else() + set(VC_LIB_PATH_SUFFIX lib/x86) +endif() + if(NOT SDL_IMAGE_LIBRARY AND SDLIMAGE_LIBRARY) set(SDL_IMAGE_LIBRARY ${SDLIMAGE_LIBRARY} CACHE FILEPATH "file cache entry initialized from old variable name") @@ -66,7 +72,7 @@ find_library(SDL_IMAGE_LIBRARY HINTS ENV SDLIMAGEDIR ENV SDLDIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX} ) if(SDL_IMAGE_INCLUDE_DIR AND EXISTS "${SDL_IMAGE_INCLUDE_DIR}/SDL_image.h") diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake index d17c907..8f2f066 100644 --- a/Modules/FindSDL_mixer.cmake +++ b/Modules/FindSDL_mixer.cmake @@ -57,6 +57,12 @@ find_path(SDL_MIXER_INCLUDE_DIR SDL_mixer.h PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(VC_LIB_PATH_SUFFIX lib/x64) +else() + set(VC_LIB_PATH_SUFFIX lib/x86) +endif() + if(NOT SDL_MIXER_LIBRARY AND SDLMIXER_LIBRARY) set(SDL_MIXER_LIBRARY ${SDLMIXER_LIBRARY} CACHE FILEPATH "file cache entry initialized from old variable name") @@ -66,7 +72,7 @@ find_library(SDL_MIXER_LIBRARY HINTS ENV SDLMIXERDIR ENV SDLDIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX} ) if(SDL_MIXER_INCLUDE_DIR AND EXISTS "${SDL_MIXER_INCLUDE_DIR}/SDL_mixer.h") diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake index c545189..e5c2cdb 100644 --- a/Modules/FindSDL_net.cmake +++ b/Modules/FindSDL_net.cmake @@ -57,6 +57,12 @@ find_path(SDL_NET_INCLUDE_DIR SDL_net.h PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(VC_LIB_PATH_SUFFIX lib/x64) +else() + set(VC_LIB_PATH_SUFFIX lib/x86) +endif() + if(NOT SDL_NET_LIBRARY AND SDLNET_LIBRARY) set(SDL_NET_LIBRARY ${SDLNET_LIBRARY} CACHE FILEPATH "file cache entry initialized from old variable name") @@ -66,7 +72,7 @@ find_library(SDL_NET_LIBRARY HINTS ENV SDLNETDIR ENV SDLDIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX} ) if(SDL_NET_INCLUDE_DIR AND EXISTS "${SDL_NET_INCLUDE_DIR}/SDL_net.h") diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake index 863699a..3a6ab7b 100644 --- a/Modules/FindSDL_sound.cmake +++ b/Modules/FindSDL_sound.cmake @@ -106,7 +106,7 @@ find_library(SDL_SOUND_LIBRARY HINTS ENV SDLSOUNDDIR ENV SDLDIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib VisualC/win32lib ) if(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake index 8f72b1a..3f58ac1 100644 --- a/Modules/FindSDL_ttf.cmake +++ b/Modules/FindSDL_ttf.cmake @@ -57,6 +57,12 @@ find_path(SDL_TTF_INCLUDE_DIR SDL_ttf.h PATH_SUFFIXES include/SDL include/SDL12 include/SDL11 include ) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(VC_LIB_PATH_SUFFIX lib/x64) +else() + set(VC_LIB_PATH_SUFFIX lib/x86) +endif() + if(NOT SDL_TTF_LIBRARY AND SDLTTF_LIBRARY) set(SDL_TTF_LIBRARY ${SDLTTF_LIBRARY} CACHE FILEPATH "file cache entry initialized from old variable name") @@ -66,7 +72,7 @@ find_library(SDL_TTF_LIBRARY HINTS ENV SDLTTFDIR ENV SDLDIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX} ) if(SDL_TTF_INCLUDE_DIR AND EXISTS "${SDL_TTF_INCLUDE_DIR}/SDL_ttf.h") |