PageRenderTime 36ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/cmake/FindELFIO.cmake

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