summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2010-10-07 15:58:20 -0700
committerMerov Linden <merov@lindenlab.com>2010-10-07 15:58:20 -0700
commitc8cd7ef7a4da4482b776c37201b158a443dd737a (patch)
tree521c6dc7af632dc9df64a69c18997eb091d68f20 /indra/cmake
parentd1ad7a56beee603b336600d4aace1e4d4c0f5ade (diff)
parentd25a30e55b7e6a20173c3a53891489adc5610d72 (diff)
Pull update from viewer-development
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/FindGoogleBreakpad.cmake40
-rw-r--r--indra/cmake/GoogleBreakpad.cmake4
2 files changed, 42 insertions, 2 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
+ )
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)