FindTIFF.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # - Find TIFF library
  2. # Find the native TIFF includes and library
  3. # This module defines
  4. # TIFF_INCLUDE_DIR, where to find tiff.h, etc.
  5. # TIFF_LIBRARIES, libraries to link against to use TIFF.
  6. # TIFF_FOUND, If false, do not try to use TIFF.
  7. # also defined, but not for general use are
  8. # TIFF_LIBRARY, where to find the TIFF library.
  9. #=============================================================================
  10. # Copyright 2002-2009 Kitware, Inc.
  11. #
  12. # Distributed under the OSI-approved BSD License (the "License");
  13. # see accompanying file Copyright.txt for details.
  14. #
  15. # This software is distributed WITHOUT ANY WARRANTY; without even the
  16. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. # See the License for more information.
  18. #=============================================================================
  19. # (To distributed this file outside of CMake, substitute the full
  20. # License text for the above reference.)
  21. FIND_PATH(TIFF_INCLUDE_DIR tiff.h)
  22. SET(TIFF_NAMES ${TIFF_NAMES} tiff libtiff libtiff3)
  23. FIND_LIBRARY(TIFF_LIBRARY NAMES ${TIFF_NAMES} )
  24. # handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if
  25. # all listed variables are TRUE
  26. INCLUDE(FindPackageHandleStandardArgs)
  27. FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR)
  28. IF(TIFF_FOUND)
  29. SET( TIFF_LIBRARIES ${TIFF_LIBRARY} )
  30. ENDIF(TIFF_FOUND)
  31. MARK_AS_ADVANCED(TIFF_INCLUDE_DIR TIFF_LIBRARY)