FindJasper.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # - Try to find the Jasper JPEG2000 library
  2. # Once done this will define
  3. #
  4. # JASPER_FOUND - system has Jasper
  5. # JASPER_INCLUDE_DIR - the Jasper include directory
  6. # JASPER_LIBRARIES - The libraries needed to use Jasper
  7. #=============================================================================
  8. # Copyright 2006-2009 Kitware, Inc.
  9. # Copyright 2006 Alexander Neundorf <[email protected]>
  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 distribute this file outside of CMake, substitute the full
  19. # License text for the above reference.)
  20. FIND_PACKAGE(JPEG)
  21. FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h)
  22. FIND_LIBRARY(JASPER_LIBRARY NAMES jasper libjasper)
  23. # handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if
  24. # all listed variables are TRUE
  25. INCLUDE(FindPackageHandleStandardArgs)
  26. FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper DEFAULT_MSG JASPER_LIBRARY JASPER_INCLUDE_DIR JPEG_LIBRARIES)
  27. IF (JASPER_FOUND)
  28. SET(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} )
  29. ENDIF (JASPER_FOUND)
  30. MARK_AS_ADVANCED(JASPER_INCLUDE_DIR JASPER_LIBRARY)