summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Pinon <vpinon@kde.org>2017-11-02 16:56:47 (GMT)
committerVincent Pinon <vpinon@kde.org>2017-11-03 19:55:13 (GMT)
commit04ee4fa9259dcaa2d18a499a40c5192f0f5f96d9 (patch)
treeb69200a19529d3f436d75151bea395a19a24de91
parent9041c04c5205a9eda2569e6da5812fa25a3c2920 (diff)
Make KCrash optional
-rw-r--r--CMakeLists.txt4
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/main.cpp4
3 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62973a4..53479fb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -90,8 +90,8 @@ else()
endif()
find_package(KF5 REQUIRED COMPONENTS Archive Bookmarks CoreAddons Config ConfigWidgets
- DBusAddons KIO WidgetsAddons NotifyConfig NewStuff XmlGui Notifications GuiAddons TextWidgets IconThemes Crash
- OPTIONAL_COMPONENTS DocTools FileMetaData)
+ DBusAddons KIO WidgetsAddons NotifyConfig NewStuff XmlGui Notifications GuiAddons TextWidgets IconThemes
+ OPTIONAL_COMPONENTS DocTools FileMetaData Crash)
if (KF5FileMetaData_FOUND)
message(STATUS "Found KF5 FileMetadata to extract file metadata")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f1fedd5..1b3cbde 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -277,7 +277,6 @@ target_link_libraries(kdenlive
KF5::Notifications
KF5::TextWidgets
KF5::IconThemes
- KF5::Crash
Qt5::Svg
${OPENGL_LIBRARIES}
${OPENGLES_LIBRARIES}
@@ -295,6 +294,11 @@ if (KF5_FILEMETADATA)
target_link_libraries(kdenlive KF5::FileMetaData)
endif()
+if (KF5Crash_FOUND)
+ add_definitions(-DKF5_USE_CRASH)
+ target_link_libraries(kdenlive KF5::Crash)
+endif()
+
qt5_use_modules( kdenlive Script Widgets Concurrent Qml Quick)
if (Qt5WebKitWidgets_FOUND)
diff --git a/src/main.cpp b/src/main.cpp
index 2d7c36f..be65bdd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -26,7 +26,9 @@
#include "kxmlgui_version.h"
#include <KAboutData>
+#ifdef KF5_USE_CRASH
#include <KCrash>
+#endif
#include <KIconLoader>
#include <KSharedConfig>
#include <KConfigGroup>
@@ -142,7 +144,9 @@ int main(int argc, char *argv[])
parser.process(app);
aboutData.processCommandLine(&parser);
+#ifdef KF5_USE_CRASH
KCrash::initialize();
+#endif
QString clipsToLoad = parser.value(QStringLiteral("i"));
QString mltPath = parser.value(QStringLiteral("mlt-path"));