FindGIF.cmake 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. # Created by Eric Wing.
  9. # Modifications by Alexander Neundorf
  10. FIND_PATH(GIF_INCLUDE_DIR gif_lib.h
  11. HINTS
  12. $ENV{GIF_DIR}
  13. PATH_SUFFIXES include
  14. PATHS
  15. ~/Library/Frameworks
  16. /Library/Frameworks
  17. /sw/include # Fink
  18. [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
  19. /usr/freeware/include
  20. )
  21. # the gif library can have many names :-/
  22. SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib)
  23. FIND_LIBRARY(GIF_LIBRARY
  24. NAMES ${POTENTIAL_GIF_LIBS}
  25. HINTS
  26. $ENV{GIF_DIR}
  27. PATH_SUFFIXES lib64 lib
  28. PATHS
  29. ~/Library/Frameworks
  30. /Library/Frameworks
  31. /usr/local
  32. /usr
  33. /sw
  34. /opt/local
  35. /opt/csw
  36. /opt
  37. [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]
  38. /usr/freeware
  39. )
  40. # see readme.txt
  41. SET(GIF_LIBRARIES ${GIF_LIBRARY})
  42. # handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if
  43. # all listed variables are TRUE
  44. INCLUDE(FindPackageHandleStandardArgs)
  45. FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF DEFAULT_MSG GIF_LIBRARY GIF_INCLUDE_DIR)
  46. MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY)