PageRenderTime 28ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/cmake/FindOpenJPEG.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 50 lines | 32 code | 8 blank | 10 comment | 0 complexity | 4412526ceecbc50f51a883c3e94f26c3 MD5 | raw file
Possible License(s): LGPL-2.1
  1. # -*- cmake -*-
  2. # - Find OpenJPEG
  3. # Find the OpenJPEG includes and library
  4. # This module defines
  5. # OPENJPEG_INCLUDE_DIR, where to find openjpeg.h, etc.
  6. # OPENJPEG_LIBRARIES, the libraries needed to use OpenJPEG.
  7. # OPENJPEG_FOUND, If false, do not try to use OpenJPEG.
  8. # also defined, but not for general use are
  9. # OPENJPEG_LIBRARY, where to find the OpenJPEG library.
  10. FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h
  11. /usr/local/include/openjpeg
  12. /usr/local/include
  13. /usr/include/openjpeg
  14. /usr/include
  15. )
  16. SET(OPENJPEG_NAMES ${OPENJPEG_NAMES} openjpeg)
  17. FIND_LIBRARY(OPENJPEG_LIBRARY
  18. NAMES ${OPENJPEG_NAMES}
  19. PATHS /usr/lib /usr/local/lib
  20. )
  21. IF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
  22. SET(OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARY})
  23. SET(OPENJPEG_FOUND "YES")
  24. ELSE (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
  25. SET(OPENJPEG_FOUND "NO")
  26. ENDIF (OPENJPEG_LIBRARY AND OPENJPEG_INCLUDE_DIR)
  27. IF (OPENJPEG_FOUND)
  28. IF (NOT OPENJPEG_FIND_QUIETLY)
  29. MESSAGE(STATUS "Found OpenJPEG: ${OPENJPEG_LIBRARIES}")
  30. ENDIF (NOT OPENJPEG_FIND_QUIETLY)
  31. ELSE (OPENJPEG_FOUND)
  32. IF (OPENJPEG_FIND_REQUIRED)
  33. MESSAGE(FATAL_ERROR "Could not find OpenJPEG library")
  34. ENDIF (OPENJPEG_FIND_REQUIRED)
  35. ENDIF (OPENJPEG_FOUND)
  36. # Deprecated declarations.
  37. SET (NATIVE_OPENJPEG_INCLUDE_PATH ${OPENJPEG_INCLUDE_DIR} )
  38. GET_FILENAME_COMPONENT (NATIVE_OPENJPEG_LIB_PATH ${OPENJPEG_LIBRARY} PATH)
  39. MARK_AS_ADVANCED(
  40. OPENJPEG_LIBRARY
  41. OPENJPEG_INCLUDE_DIR
  42. )