summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-23 19:10:35 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-23 19:10:35 +0200
commit60519897a43be9aba177f6a0f542851510322c8e (patch)
tree697e553622067a8fbcf712c7dfd1c9fa6b5bd612 /CMakeLists.txt
parent8857523fada67140e1a07cabb1b7c8b48200a753 (diff)
Integrate Google Breakpad for crash dumps
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2f8daadb..cffe88cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,16 @@ if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-std=c++11)
endif()
+if(WIN32)
+ set(SDK_GOOGLE_BREAKPAD "" CACHE PATH "google-breakpad for crash reporting")
+endif()
+
+if(SDK_GOOGLE_BREAKPAD)
+ add_definitions(-DOPENTRACK_BREAKPAD)
+ include_directories("${SDK_GOOGLE_BREAKPAD}/src/client/windows/handler")
+ include_directories("${SDK_GOOGLE_BREAKPAD}/src/")
+endif()
+
if(UNIX)
set(SDK_ENABLE_LIBEVDEV FALSE CACHE BOOL "libevdev virtual joystick protocol support (probably Linux only)")
endif()
@@ -579,6 +589,11 @@ endif()
if(NOT WIN32)
target_link_libraries(opentrack dl)
endif()
+ if(SDK_GOOGLE_BREAKPAD AND MSVC)
+ target_link_libraries(opentrack "${SDK_GOOGLE_BREAKPAD}/src/client/windows/Release/lib/crash_generation_client.lib"
+ "${SDK_GOOGLE_BREAKPAD}/src/client/windows/Release/lib/exception_handler.lib"
+ "${SDK_GOOGLE_BREAKPAD}/src/client/windows/Release/lib/common.lib")
+ endif()
set_target_properties(opentrack PROPERTIES COMPILE_FLAGS -DOPENTRACK_MAIN)
endif()