FindGIF.cmake 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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
  5. #
  6. # $GIF_DIR is an environment variable that would
  7. # correspond to the ./configure --prefix=$GIF_DIR
  8. #=============================================================================
  9. # Copyright 2007-2009 Kitware, Inc.
  10. #
  11. # Distributed under the OSI-approved BSD License (the "License");
  12. # see accompanying file Copyright.txt for details.
  13. #
  14. # This software is distributed WITHOUT ANY WARRANTY; without even the
  15. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. # See the License for more information.
  17. #=============================================================================
  18. # (To distributed this file outside of CMake, substitute the full
  19. # License text for the above reference.)
  20. # Created by Eric Wing.
  21. # Modifications by Alexander Neundorf
  22. FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
  23. HINTS
  24. $ENV{GIF_DIR}
  25. PATH_SUFFIXES include
  26. PATHS
  27. ~/Library/Frameworks
  28. /Library/Frameworks
  29. /sw/include # Fink
  30. [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
  31. /usr/freeware/include
  32. )
  33. # the gif library can have many names :-/
  34. SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib)
  35. FIND_LIBRARY(GIF_LIBRARY
  36. NAMES ${POTENTIAL_GIF_LIBS}
  37. HINTS
  38. $ENV{GIF_DIR}
  39. PATH_SUFFIXES lib64 lib
  40. PATHS
  41. ~/Library/Frameworks
  42. /Library/Frameworks
  43. /usr/local
  44. /usr
  45. /sw
  46. /opt/local
  47. /opt/csw
  48. /opt
  49. [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
  50. /usr/freeware
  51. )
  52. # see readme.txt
  53. SET(GIF_LIBRARIES ${GIF_LIBRARY})
  54. # handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if
  55. # all listed variables are TRUE
  56. INCLUDE(FindPackageHandleStandardArgs)
  57. FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF DEFAULT_MSG GIF_LIBRARY GIF_INCLUDE_DIR)
  58. MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY)