PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms 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
 1# -*- cmake -*-
 2
 3# - Find ELFIO
 4# Find the ELFIO includes and library
 5# This module defines
 6#  ELFIO_INCLUDE_DIR, where to find elfio.h, etc.
 7#  ELFIO_LIBRARIES, the libraries needed to use ELFIO.
 8#  ELFIO_FOUND, If false, do not try to use ELFIO.
 9# also defined, but not for general use are
10#  ELFIO_LIBRARY, where to find the ELFIO library.
11
12FIND_PATH(ELFIO_INCLUDE_DIR ELFIO/ELFIO.h
13/usr/local/include
14/usr/include
15)
16
17SET(ELFIO_NAMES ${ELFIO_NAMES} ELFIO)
18FIND_LIBRARY(ELFIO_LIBRARY
19  NAMES ${ELFIO_NAMES}
20  PATHS /usr/lib /usr/local/lib
21  )
22
23IF (ELFIO_LIBRARY AND ELFIO_INCLUDE_DIR)
24    SET(ELFIO_LIBRARIES ${ELFIO_LIBRARY})
25    SET(ELFIO_FOUND "YES")
26ELSE (ELFIO_LIBRARY AND ELFIO_INCLUDE_DIR)
27  SET(ELFIO_FOUND "NO")
28ENDIF (ELFIO_LIBRARY AND ELFIO_INCLUDE_DIR)
29
30
31IF (ELFIO_FOUND)
32   IF (NOT ELFIO_FIND_QUIETLY)
33      MESSAGE(STATUS "Found ELFIO: ${ELFIO_LIBRARIES}")
34   ENDIF (NOT ELFIO_FIND_QUIETLY)
35ELSE (ELFIO_FOUND)
36   IF (ELFIO_FIND_REQUIRED)
37      MESSAGE(FATAL_ERROR "Could not find ELFIO library")
38   ENDIF (ELFIO_FIND_REQUIRED)
39ENDIF (ELFIO_FOUND)
40
41# Deprecated declarations.
42SET (NATIVE_ELFIO_INCLUDE_PATH ${ELFIO_INCLUDE_DIR} )
43GET_FILENAME_COMPONENT (NATIVE_ELFIO_LIB_PATH ${ELFIO_LIBRARY} PATH)
44
45MARK_AS_ADVANCED(
46  ELFIO_LIBRARY
47  ELFIO_INCLUDE_DIR
48  )