diff options
author | Benjamin Eikel <cmake@eikel.org> | 2013-11-11 21:26:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-11-21 20:30:36 (GMT) |
commit | 9619719882935b9f5bed43079a1ac74f82c09ba1 (patch) | |
tree | cd91bdfd0321e3eabaf25a342ccead0a1123f467 /Modules/FindSDL.cmake | |
parent | 13da9f00245694d3dee9f4c9b245f0e3941284c5 (diff) | |
download | CMake-9619719882935b9f5bed43079a1ac74f82c09ba1.zip CMake-9619719882935b9f5bed43079a1ac74f82c09ba1.tar.gz CMake-9619719882935b9f5bed43079a1ac74f82c09ba1.tar.bz2 |
FindSDL: Add additional search paths on MSVC (#14029)
Add an architecture-specific library directory path suffix for each
component. Use different search path for SDL_sound. Project files in
VisualC directory suggest that a win32lib will hold the libraries.
Reported-by: Paul Hampson <Paul.Hampson@Pobox.com>
Diffstat (limited to 'Modules/FindSDL.cmake')
-rw-r--r-- | Modules/FindSDL.cmake | 10 |
1 files changed, 8 insertions, 2 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 |