Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Modules / FindSDL_net.cmake
blob8d0ce8aed7cd8b6f836a4f9d0f0b2c28f584a3bf
1 # Locate SDL_net library
2 # This module defines
3 # SDLNET_LIBRARY, the name of the library to link against
4 # SDLNET_FOUND, if false, do not try to link against
5 # SDLNET_INCLUDE_DIR, where to find the headers
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).
16 FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h
17   PATHS
18   $ENV{SDLNETDIR}
19   $ENV{SDLDIR}
20   NO_DEFAULT_PATH
21   PATH_SUFFIXES include
24 FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h
25   PATHS
26   ~/Library/Frameworks
27   /Library/Frameworks
28   /usr/local/include/SDL
29   /usr/include/SDL
30   /usr/local/include/SDL12
31   /usr/local/include/SDL11 # FreeBSD ports
32   /usr/include/SDL12
33   /usr/include/SDL11
34   /usr/local/include
35   /usr/include
36   /sw/include/SDL # Fink
37   /sw/include
38   /opt/local/include/SDL # DarwinPorts
39   /opt/local/include
40   /opt/csw/include/SDL # Blastwave
41   /opt/csw/include 
42   /opt/include/SDL
43   /opt/include
45 FIND_LIBRARY(SDLNET_LIBRARY 
46   NAMES SDL_net
47   PATHS
48   $ENV{SDLNETDIR}
49   $ENV{SDLDIR}
50   NO_DEFAULT_PATH
51     PATH_SUFFIXES lib64 lib
54 FIND_LIBRARY(SDLNET_LIBRARY 
55   NAMES SDL_net
56   PATHS
57   ~/Library/Frameworks
58   /Library/Frameworks
59   /usr/local
60   /usr
61   /sw
62   /opt/local
63   /opt/csw
64   /opt
65     PATH_SUFFIXES lib64 lib
68 SET(SDLNET_FOUND "NO")
69 IF(SDLNET_LIBRARY AND SDLNET_INCLUDE_DIR)
70   SET(SDLNET_FOUND "YES")
71 ENDIF(SDLNET_LIBRARY AND SDLNET_INCLUDE_DIR)