Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Modules / FindSDL_image.cmake
blobe2481e1abc6ccce69e9355b6e3e56d48d05f73ab
1 # Locate SDL_image library
2 # This module defines
3 # SDLIMAGE_LIBRARY, the name of the library to link against
4 # SDLIMAGE_FOUND, if false, do not try to link to SDL
5 # SDLIMAGE_INCLUDE_DIR, where to find SDL/SDL.h
7 # $SDLDIR is an environment variable that would
8 # correspond to the ./configure --prefix=$SDLDIR
9 # used in building SDL.
11 # Created by Eric Wing. This was influenced by the FindSDL.cmake 
12 # module, but with modifications to recognize OS X frameworks and 
13 # additional Unix paths (FreeBSD, etc).
15 FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h
16   HINTS
17   $ENV{SDLIMAGEDIR}
18   $ENV{SDLDIR}
19   PATH_SUFFIXES include
20   PATHS
21   ~/Library/Frameworks
22   /Library/Frameworks
23   /usr/local/include/SDL
24   /usr/include/SDL
25   /usr/local/include/SDL12
26   /usr/local/include/SDL11 # FreeBSD ports
27   /usr/include/SDL12
28   /usr/include/SDL11
29   /usr/local/include
30   /usr/include
31   /sw/include/SDL # Fink
32   /sw/include
33   /opt/local/include/SDL # DarwinPorts
34   /opt/local/include
35   /opt/csw/include/SDL # Blastwave
36   /opt/csw/include 
37   /opt/include/SDL
38   /opt/include
41 FIND_LIBRARY(SDLIMAGE_LIBRARY 
42   NAMES SDL_image
43   HINTS
44   $ENV{SDLIMAGEDIR}
45   $ENV{SDLDIR}
46   PATH_SUFFIXES lib64 lib
47   PATHS
48   ~/Library/Frameworks
49   /Library/Frameworks
50   /usr/local
51   /usr
52   /sw
53   /opt/local
54   /opt/csw
55   /opt
58 SET(SDLIMAGE_FOUND "NO")
59 IF(SDLIMAGE_LIBRARY AND SDLIMAGE_INCLUDE_DIR)
60   SET(SDLIMAGE_FOUND "YES")
61 ENDIF(SDLIMAGE_LIBRARY AND SDLIMAGE_INCLUDE_DIR)