From c2d844c972419e3bd90076f4e5ee6296007b0e6e Mon Sep 17 00:00:00 2001 From: Techwolf Lupindo Date: Mon, 16 Aug 2010 22:10:18 -0400 Subject: SNOW-746: Finished Google BreakPad cmake for standalone (transplanted from 5a7ee78d029e973084e28d0d23a7233e0d976dca) --- indra/cmake/FindGoogleBreakpad.cmake | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 indra/cmake/FindGoogleBreakpad.cmake (limited to 'indra/cmake/FindGoogleBreakpad.cmake') diff --git a/indra/cmake/FindGoogleBreakpad.cmake b/indra/cmake/FindGoogleBreakpad.cmake new file mode 100644 index 0000000000..1a0493be5e --- /dev/null +++ b/indra/cmake/FindGoogleBreakpad.cmake @@ -0,0 +1,40 @@ +# -*- cmake -*- + +# - Find Google BreakPad +# Find the Google BreakPad includes and library +# This module defines +# BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR, where to find exception_handler.h, etc. +# BREAKPAD_EXCEPTION_HANDLER_LIBRARIES, the libraries needed to use Google BreakPad. +# BREAKPAD_EXCEPTION_HANDLER_FOUND, If false, do not try to use Google BreakPad. +# also defined, but not for general use are +# BREAKPAD_EXCEPTION_HANDLER_LIBRARY, where to find the Google BreakPad library. + +FIND_PATH(BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR google_breakpad/exception_handler.h) + +SET(BREAKPAD_EXCEPTION_HANDLER_NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} breakpad_client) +FIND_LIBRARY(BREAKPAD_EXCEPTION_HANDLER_LIBRARY + NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} + ) + +IF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR) + SET(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY}) + SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "YES") +ELSE (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR) + SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "NO") +ENDIF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR) + + +IF (BREAKPAD_EXCEPTION_HANDLER_FOUND) + IF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY) + MESSAGE(STATUS "Found Google BreakPad: ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}") + ENDIF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY) +ELSE (BREAKPAD_EXCEPTION_HANDLER_FOUND) + IF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Google BreakPad library") + ENDIF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED) +ENDIF (BREAKPAD_EXCEPTION_HANDLER_FOUND) + +MARK_AS_ADVANCED( + BREAKPAD_EXCEPTION_HANDLER_LIBRARY + BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR + ) -- cgit v1.2.3