summaryrefslogtreecommitdiff
path: root/Modules/FindSDL.cmake
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2003-01-22 14:49:45 -0500
committerKen Martin <ken.martin@kitware.com>2003-01-22 14:49:45 -0500
commitfde48d14fda5f1b7a63e1a3de385ab95f55aae90 (patch)
tree5ab2c30652ea6f4d64218d456c77938284de485c /Modules/FindSDL.cmake
parentac888a15c885e2a9e4cba8251837892734399fd9 (diff)
downloadcmake-fde48d14fda5f1b7a63e1a3de385ab95f55aae90.tar.gz
merge from branch
Diffstat (limited to 'Modules/FindSDL.cmake')
-rw-r--r--Modules/FindSDL.cmake33
1 files changed, 33 insertions, 0 deletions
diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake
new file mode 100644
index 0000000000..a9cce348eb
--- /dev/null
+++ b/Modules/FindSDL.cmake
@@ -0,0 +1,33 @@
+# Locate SDL library
+# This module defines
+# SDL_LIBRARY, the name of the library to link against
+# SDL_FOUND, if false, do not try to link to SDL
+# SDL_INCLUDE_DIR, where to find SDL/SDL.h
+#
+# $SDLDIR is an environment variable that would
+# correspond to the ./configure --prefix=$SDLDIR
+# used in building SDL.
+# l.e.galup 9-20-02
+
+
+
+IF (UNIX)
+
+ FIND_LIBRARY(SDL_LIBRARY SDL
+ $ENV{SDLDIR}/lib
+ /usr/lib
+ /usr/local/lib
+ )
+
+ FIND_PATH( SDL_INCLUDE_DIR SDL/SDL.h
+ $ENV{SDLDIR}/include
+ /usr/include
+ /usr/local/include
+ )
+
+ENDIF (UNIX)
+
+SET( SDL_FOUND "NO" )
+IF(SDL_LIBRARY)
+ SET( SDL_FOUND "YES" )
+ENDIF(SDL_LIBRARY)