Commit 432989f9 authored by Frederik Schwarzer's avatar Frederik Schwarzer

Use KCrash.

parent ec363ba9
...@@ -2,28 +2,29 @@ project(lskat) ...@@ -2,28 +2,29 @@ project(lskat)
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR) cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.3.0") set (QT_MIN_VERSION "5.3.0")
set (KF5_MIN_VERSION "5.15.0")
find_package(ECM 1.7.0 REQUIRED CONFIG) find_package(ECM 1.7.0 REQUIRED CONFIG)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) 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(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
ItemModels
WidgetsAddons
WindowSystem
Config Config
ConfigWidgets
CoreAddons
Crash
DBusAddons DBusAddons
DocTools
I18n I18n
ConfigWidgets ItemModels
TextWidgets KDELibs4Support
XmlGui
KIO KIO
NotifyConfig
NewStuff NewStuff
KDELibs4Support NotifyConfig
DocTools TextWidgets
WidgetsAddons
WindowSystem
XmlGui
) )
find_package(KF5KDEGames 4.9.0 REQUIRED) find_package(KF5KDEGames 4.9.0 REQUIRED)
...@@ -43,8 +44,16 @@ add_subdirectory(grafix) ...@@ -43,8 +44,16 @@ add_subdirectory(grafix)
add_subdirectory(doc) add_subdirectory(doc)
########### install files ############### ########### install files ###############
install( PROGRAMS org.kde.lskat.desktop DESTINATION ${KDE_INSTALL_APPDIR} ) install(PROGRAMS org.kde.lskat.desktop DESTINATION ${KDE_INSTALL_APPDIR})
ecm_install_icons( ICONS 128-apps-lskat.png 16-apps-lskat.png 22-apps-lskat.png 32-apps-lskat.png 48-apps-lskat.png 64-apps-lskat.png DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor ) ecm_install_icons(ICONS
128-apps-lskat.png
16-apps-lskat.png
22-apps-lskat.png
32-apps-lskat.png
48-apps-lskat.png
64-apps-lskat.png
DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor
)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
set( lskat_SRCS set(lskat_SRCS
lskat_debug.cpp lskat_debug.cpp
thememanager.cpp thememanager.cpp
namedialogwidget.cpp namedialogwidget.cpp
...@@ -23,12 +23,13 @@ set( lskat_SRCS ...@@ -23,12 +23,13 @@ set( lskat_SRCS
aiinput.cpp aiinput.cpp
fromlibkdegames/cardcache.cpp fromlibkdegames/cardcache.cpp
fromlibkdegames/carddeckinfo.cpp fromlibkdegames/carddeckinfo.cpp
fromlibkdegames/kcarddialog.cpp ) fromlibkdegames/kcarddialog.cpp
)
ki18n_wrap_ui(lskat_SRCS
ki18n_wrap_ui( lskat_SRCS
namedialog.ui namedialog.ui
fromlibkdegames/kgamecardselector.ui ) fromlibkdegames/kgamecardselector.ui
)
configure_file(config-src.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-src.h) configure_file(config-src.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-src.h)
...@@ -36,12 +37,17 @@ file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../*-apps-lskat.png") ...@@ -36,12 +37,17 @@ file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/../*-apps-lskat.png")
ecm_add_app_icon(lskat_SRCS ICONS ${ICONS_SRCS}) ecm_add_app_icon(lskat_SRCS ICONS ${ICONS_SRCS})
add_executable( lskat ${lskat_SRCS} ) add_executable( lskat ${lskat_SRCS} )
target_link_libraries( lskat KF5KDEGames KF5::KDELibs4Support Qt5::Gui Qt5::Svg ) target_link_libraries(lskat
Qt5::Gui
Qt5::Svg
KF5::Crash
KF5::KDELibs4Support
KF5KDEGames
)
install(TARGETS lskat ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} ) install(TARGETS lskat ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ############### ########### install files ###############
install( FILES lskatui.rc DESTINATION ${KDE_INSTALL_DATADIR}/lskat ) install(FILES lskatui.rc DESTINATION ${KDE_INSTALL_DATADIR}/lskat)
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include "lskat_debug.h" #include "lskat_debug.h"
#include <K4AboutData> #include <K4AboutData>
#include <KCrash>
#include <KLocalizedString> #include <KLocalizedString>
#include <kglobal.h> #include <kglobal.h>
#include <KDebug> #include <KDebug>
...@@ -91,6 +92,7 @@ int main(int argc, char *argv[]) ...@@ -91,6 +92,7 @@ int main(int argc, char *argv[])
/* command line handling */ /* command line handling */
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
KCrash::initialize();
// Check for debug command line option // Check for debug command line option
if (args->isSet("debug")) if (args->isSet("debug"))
......
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