summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoroondas Gupte <hg@boroon.dasgupta.ch>2010-09-29 12:57:32 +0200
committerBoroondas Gupte <hg@boroon.dasgupta.ch>2010-09-29 12:57:32 +0200
commit704cdf2bc3cd8ce6c567117c0466f92f7279fd85 (patch)
treed6118c764d76a393f504efc1379dd92231b3ba8b
parent443cf1f72e443c62c0ed92e629b040bb50dd7b58 (diff)
parentc2d844c972419e3bd90076f4e5ee6296007b0e6e (diff)
merged SNOW-746: Finished Google BreakPad cmake for standalone
-rw-r--r--doc/contributions.txt1
-rw-r--r--indra/cmake/FindGoogleBreakpad.cmake40
-rw-r--r--indra/cmake/GoogleBreakpad.cmake4
3 files changed, 43 insertions, 2 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index d8dec69269..d179c0fb8c 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -665,6 +665,7 @@ Techwolf Lupindo
SNOW-681
SNOW-685
SNOW-690
+ SNOW-746
VWR-12385
tenebrous pau
VWR-247
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
+ )
diff --git a/indra/cmake/GoogleBreakpad.cmake b/indra/cmake/GoogleBreakpad.cmake
index 8270c0fabb..7498674042 100644
--- a/indra/cmake/GoogleBreakpad.cmake
+++ b/indra/cmake/GoogleBreakpad.cmake
@@ -2,8 +2,8 @@
include(Prebuilt)
if (STANDALONE)
- MESSAGE(FATAL_ERROR "*TODO standalone support for google breakad is unimplemented")
- # *TODO - implement this include(FindGoogleBreakpad)
+ set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON)
+ include(FindGoogleBreakpad)
else (STANDALONE)
use_prebuilt_binary(google_breakpad)
if (DARWIN)