Commit 3916b794 authored by Frederik Schwarzer's avatar Frederik Schwarzer

Use KCrash.

parent 709d549a
......@@ -2,14 +2,16 @@ project(kgoldrunner)
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.3.0")
set (KF5_MIN_VERSION "5.15.0")
find_package(ECM 1.7.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Widgets Qml Quick QuickWidgets Svg Test)
find_package(KF5 REQUIRED COMPONENTS
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
CoreAddons
Config
Crash
ItemModels
WidgetsAddons
WindowSystem
......@@ -38,9 +40,9 @@ include(ECMAddAppIcon)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_subdirectory( src )
add_subdirectory( gamedata )
add_subdirectory( themes )
add_subdirectory( doc )
add_subdirectory(src)
add_subdirectory(gamedata)
add_subdirectory(themes)
add_subdirectory(doc)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -20,19 +20,35 @@ set(kgoldrunner_SRCS
main.cpp
kgrselector.cpp
kgrsounds.cpp
kgrdialog.cpp )
kgrdialog.cpp
)
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-kgoldrunner.png")
ecm_add_app_icon(kgoldrunner_SRCS ICONS ${ICONS_SRCS})
add_executable(kgoldrunner ${kgoldrunner_SRCS})
target_link_libraries(kgoldrunner KF5KDEGames KF5KDEGamesPrivate KF5::KDELibs4Support KF5::DBusAddons)
target_link_libraries(kgoldrunner
KF5KDEGames
KF5KDEGamesPrivate
KF5::KDELibs4Support
KF5::DBusAddons
KF5::Crash
)
install(TARGETS kgoldrunner ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
########### install files ###############
install( PROGRAMS org.kde.KGoldrunner.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install( FILES kgoldrunnerui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kgoldrunner )
install(PROGRAMS org.kde.KGoldrunner.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES kgoldrunnerui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kgoldrunner)
ecm_install_icons(ICONS
128-apps-kgoldrunner.png
16-apps-kgoldrunner.png
22-apps-kgoldrunner.png
32-apps-kgoldrunner.png
48-apps-kgoldrunner.png
64-apps-kgoldrunner.png
DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor
)
ecm_install_icons( ICONS 128-apps-kgoldrunner.png 16-apps-kgoldrunner.png 22-apps-kgoldrunner.png 32-apps-kgoldrunner.png 48-apps-kgoldrunner.png 64-apps-kgoldrunner.png DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor )
......@@ -20,6 +20,7 @@
#include "kgoldrunner_debug.h"
#include <KAboutData>
#include <KCrash>
#include <KLocalizedString>
#include <QApplication>
......@@ -57,6 +58,7 @@ int main (int argc, char **argv)
QCommandLineParser parser;
KAboutData::setApplicationData(about);
KCrash::initialize();
parser.addVersionOption();
parser.addHelpOption();
about.setupCommandLine(&parser);
......
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