Files
SingularityViewer/indra/cmake/GoogleBreakpad.cmake
Aleric Inglewood 034ff0a305 Fix google breakpad for standalone.
The normal usage is to include the src/ directory of google breakpad
in your application and then include client/ARCH/handler/exception_handler.h
where ARCH is windows, mac or linux.

However, Linden Lab for some reason packaged the breakpad prebuilt
with exception_handler.h installed in ../google_breakpad/exception_handler.h
where "../google_breakpad" is the 'root' of the include tree comparable
with 'src' in the source tree of google breakpad.

Hence, instead of including 'src' one now must include '../include/google_breakpad'
which was already done correctly for non-standable, but not for
standalone (BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR was set to '../include'
with the 'google_breakpad' and is subsequently never used: instead
BREAKPAD_INCLUDE_DIRECTORIES is used (which is set for non-standalone)).

Therefore one much not include "google_breakpad/exception_handler.h",
but just "exception_handler.h" or you rely on somehow the directory
*below* BREAKPAD_INCLUDE_DIRECTORIES to be part of the include path as
well.

Finally LL packages the prebuilt if another duplicate minidump_descriptor.h
in the include root. Also here including "minidump_descriptor.h" would
be better correct, but following the instructions by Google this time
we might as well include the original "client/linux/handler/minidump_descriptor.h".

My repo (http://github.com/AlericInglewood/3p-google-breakpad) doesn't
even put minidump_descriptor.h in the root anymore, only
exception_handler.h. The rest is an exact copy of the 'src' tree with
regard to the headers.

Tested to compile both standalone and non-standalone.
2013-10-05 19:44:37 +02:00

22 lines
837 B
CMake

# -*- cmake -*-
include(Prebuilt)
if (STANDALONE)
set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON)
include(FindGoogleBreakpad)
else (STANDALONE)
use_prebuilt_binary(google_breakpad)
if (DARWIN)
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler)
endif (DARWIN)
if (LINUX)
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES breakpad_client)
endif (LINUX)
if (WINDOWS)
set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler crash_generation_client crash_generation_server common)
endif (WINDOWS)
# yes, this does look dumb, no, it's not incorrect
# I think it's incorrect: the second one should go --Aleric
set(BREAKPAD_INCLUDE_DIRECTORIES "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad" "${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include/google_breakpad/google_breakpad")
endif (STANDALONE)