Commit 04ee4fa9 authored by Vincent Pinon's avatar Vincent Pinon

Make KCrash optional

parent 9041c04c
......@@ -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")
......
......@@ -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)
......
......@@ -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"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment