Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dschmidt/libcrashreporter-qt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitri Ovodok <dmitrio95@yandex.ru>2019-02-21 11:04:29 +0300
committerDmitri Ovodok <dmitrio95@yandex.ru>2019-02-22 17:15:24 +0300
commit43ea1910dbe1130a34e0cbeaf3bb490ed358d97b (patch)
tree6c7b589083f3ff89475dc484bd98b2b605c181b4
parent4f2339dcdf55ded84bdab91e82116801b32314d3 (diff)
Add an option to disable crash reporter GUI component
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/CMakeLists.txt5
-rw-r--r--src/libcrashreporter-handler/Handler.cpp2
3 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 691f541..1adc43c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,8 @@ if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()
-option(ENABLE_GPL_CODE OFF)
+option(ENABLE_GPL_CODE "Enable GPL-licensed depencencies of libcrashreporter-qt (dr.konqui integration)" OFF)
+option(ENABLE_CRASH_REPORTER "Enable libcrashreporter-qt GUI component" ON)
find_package(Qt5 COMPONENTS Core Network Widgets)
@@ -18,5 +19,9 @@ if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_FLAGS) OR
string(REPLACE "-std=c++14" "-std=gnu++14" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
endif()
+if(ENABLE_CRASH_REPORTER)
+ add_definitions(-DENABLE_CRASH_REPORTER)
+endif(ENABLE_CRASH_REPORTER)
+
add_subdirectory(3rdparty)
add_subdirectory(src)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cee1842..14638bd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,2 +1,5 @@
add_subdirectory(libcrashreporter-handler)
-add_subdirectory(libcrashreporter-gui)
+
+if (ENABLE_CRASH_REPORTER)
+ add_subdirectory(libcrashreporter-gui)
+endif(ENABLE_CRASH_REPORTER)
diff --git a/src/libcrashreporter-handler/Handler.cpp b/src/libcrashreporter-handler/Handler.cpp
index 40307ac..2ef58ed 100644
--- a/src/libcrashreporter-handler/Handler.cpp
+++ b/src/libcrashreporter-handler/Handler.cpp
@@ -218,7 +218,7 @@ LaunchUploader( const char* dump_dir, const char* minidump_id, void* context, bo
printf( "Error: Can't launch CrashReporter!\n" );
return false;
}
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) && defined(ENABLE_CRASH_REPORTER)
// If we're running on Linux, we expect that the CrashReporter component will
// attach gdb, do its thing and then kill this process, so we hang here for the
// time being, on purpose. -- Teo 3/2016