Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Modules / FindGIF.cmake
blob1d3a5ec1ee1aeb1f2f3e8024d6ec2bfc139d9777
1 # This module defines
2 # GIF_LIBRARIES - libraries to link to in order to use GIF
3 # GIF_FOUND, if false, do not try to link 
4 # GIF_INCLUDE_DIR, where to find the headers
6 # $GIF_DIR is an environment variable that would
7 # correspond to the ./configure --prefix=$GIF_DIR
9 # Created by Eric Wing. 
10 # Modifications by Alexander Neundorf
12 FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
13   HINTS
14   $ENV{GIF_DIR}
15   PATH_SUFFIXES include
16   PATHS
17   ~/Library/Frameworks
18   /Library/Frameworks
19   /sw/include # Fink
20   [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
21   /usr/freeware/include
24 # the gif library can have many names :-/
25 SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib)
27 FIND_LIBRARY(GIF_LIBRARY 
28   NAMES ${POTENTIAL_GIF_LIBS}
29   HINTS
30   $ENV{GIF_DIR}
31   PATH_SUFFIXES lib64 lib
32   PATHS
33   ~/Library/Frameworks
34   /Library/Frameworks
35   /usr/local
36   /usr
37   /sw
38   /opt/local
39   /opt/csw
40   /opt
41   [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
42   /usr/freeware
45 # see readme.txt
46 SET(GIF_LIBRARIES ${GIF_LIBRARY})
48 # handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if 
49 # all listed variables are TRUE
50 INCLUDE(FindPackageHandleStandardArgs)
51 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF  DEFAULT_MSG  GIF_LIBRARY  GIF_INCLUDE_DIR)
53 MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY)