PageRenderTime 13ms CodeModel.GetById 11ms app.highlight 0ms RepoModel.GetById 2ms app.codeStats 0ms

/indra/cmake/FindGoogleBreakpad.cmake

https://bitbucket.org/lindenlab/viewer-beta/
CMake | 40 lines | 24 code | 7 blank | 9 comment | 0 complexity | f606feb30fb05d5f9fd02f8e6927acc8 MD5 | raw file
 1# -*- cmake -*-
 2
 3# - Find Google BreakPad
 4# Find the Google BreakPad includes and library
 5# This module defines
 6#  BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR, where to find exception_handler.h, etc.
 7#  BREAKPAD_EXCEPTION_HANDLER_LIBRARIES, the libraries needed to use Google BreakPad.
 8#  BREAKPAD_EXCEPTION_HANDLER_FOUND, If false, do not try to use Google BreakPad.
 9# also defined, but not for general use are
10#  BREAKPAD_EXCEPTION_HANDLER_LIBRARY, where to find the Google BreakPad library.
11
12FIND_PATH(BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR google_breakpad/exception_handler.h)
13
14SET(BREAKPAD_EXCEPTION_HANDLER_NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} breakpad_client)
15FIND_LIBRARY(BREAKPAD_EXCEPTION_HANDLER_LIBRARY
16  NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES}
17  )
18
19IF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR)
20    SET(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY})
21    SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "YES")
22ELSE (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR)
23    SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "NO")
24ENDIF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR)
25
26
27IF (BREAKPAD_EXCEPTION_HANDLER_FOUND)
28   IF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY)
29      MESSAGE(STATUS "Found Google BreakPad: ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}")
30   ENDIF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY)
31ELSE (BREAKPAD_EXCEPTION_HANDLER_FOUND)
32   IF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED)
33      MESSAGE(FATAL_ERROR "Could not find Google BreakPad library")
34   ENDIF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED)
35ENDIF (BREAKPAD_EXCEPTION_HANDLER_FOUND)
36
37MARK_AS_ADVANCED(
38  BREAKPAD_EXCEPTION_HANDLER_LIBRARY
39  BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR
40  )