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

Use KCrash.

parent ec363ba9
......@@ -2,28 +2,29 @@ project(lskat)
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
CoreAddons
Config
ItemModels
WidgetsAddons
WindowSystem
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Config
ConfigWidgets
CoreAddons
Crash
DBusAddons
DocTools
I18n
ConfigWidgets
TextWidgets
XmlGui
ItemModels
KDELibs4Support
KIO
NotifyConfig
NewStuff
KDELibs4Support
DocTools
NotifyConfig
TextWidgets
WidgetsAddons
WindowSystem
XmlGui
)
find_package(KF5KDEGames 4.9.0 REQUIRED)
......@@ -43,8 +44,16 @@ add_subdirectory(grafix)
add_subdirectory(doc)
########### install files ###############
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 )
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
)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
set( lskat_SRCS
set(lskat_SRCS
lskat_debug.cpp
thememanager.cpp
namedialogwidget.cpp
......@@ -23,12 +23,13 @@ set( lskat_SRCS
aiinput.cpp
fromlibkdegames/cardcache.cpp
fromlibkdegames/carddeckinfo.cpp
fromlibkdegames/kcarddialog.cpp )
fromlibkdegames/kcarddialog.cpp
)
ki18n_wrap_ui( lskat_SRCS
ki18n_wrap_ui(lskat_SRCS
namedialog.ui
fromlibkdegames/kgamecardselector.ui )
fromlibkdegames/kgamecardselector.ui
)
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")
ecm_add_app_icon(lskat_SRCS ICONS ${ICONS_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 lskatui.rc DESTINATION ${KDE_INSTALL_DATADIR}/lskat )
install(FILES lskatui.rc DESTINATION ${KDE_INSTALL_DATADIR}/lskat)
......@@ -46,6 +46,7 @@
#include <kcmdlineargs.h>
#include "lskat_debug.h"
#include <K4AboutData>
#include <KCrash>
#include <KLocalizedString>
#include <kglobal.h>
#include <KDebug>
......@@ -91,6 +92,7 @@ int main(int argc, char *argv[])
/* command line handling */
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
KCrash::initialize();
// Check for debug command line option
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