summaryrefslogtreecommitdiff
path: root/indra/cmake/FindGoogleBreakpad.cmake
diff options
context:
space:
mode:
authorTechwolf Lupindo <bitbucket.org@trap.wereanimal.net>2010-08-16 22:10:18 -0400
committerTechwolf Lupindo <bitbucket.org@trap.wereanimal.net>2010-08-16 22:10:18 -0400
commitc2d844c972419e3bd90076f4e5ee6296007b0e6e (patch)
tree863d57a92a82d4077ea63720ff112b306cd179c0 /indra/cmake/FindGoogleBreakpad.cmake
parentfa06293a4c637b31094a8c6907982851d4d0b464 (diff)
SNOW-746: Finished Google BreakPad cmake for standalone
(transplanted from 5a7ee78d029e973084e28d0d23a7233e0d976dca)
Diffstat (limited to 'indra/cmake/FindGoogleBreakpad.cmake')
-rw-r--r--indra/cmake/FindGoogleBreakpad.cmake40
1 files changed, 40 insertions, 0 deletions
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
+ )