Commit fbe32bbe authored by Frederik Schwarzer's avatar Frederik Schwarzer
Browse files

Use KCrash.

parent efbf4d3b
......@@ -2,27 +2,28 @@ PROJECT(ksquares)
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 Test)
find_package(KF5 REQUIRED COMPONENTS
CoreAddons
Config
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Config
ConfigWidgets
CoreAddons
Crash
DBusAddons
DocTools
WidgetsAddons
Config
I18n
GuiAddons
ConfigWidgets
ItemViews
IconThemes
XmlGui
GuiAddons
I18n
IconThemes
ItemViews
KIO
NotifyConfig
)
WidgetsAddons
XmlGui
)
find_package(KF5KDEGames 4.9.0 REQUIRED)
......
set(ksquares_SRCS
main.cpp
ksquareswindow.cpp
gameboardview.cpp
gameboardscene.cpp
ksquaresgame.cpp
aicontroller.cpp
newgamedialog.cpp
ksquaresdemowindow.cpp
themegraphicsitems.cpp
highlightanimation.cpp
scoresdialog.cpp
main.cpp
ksquareswindow.cpp
gameboardview.cpp
gameboardscene.cpp
ksquaresgame.cpp
aicontroller.cpp
newgamedialog.cpp
ksquaresdemowindow.cpp
themegraphicsitems.cpp
highlightanimation.cpp
scoresdialog.cpp
)
include_directories(${CMAKE_SOURCE_DIR}/libKF5KDEGames/highscore)
......@@ -23,14 +23,31 @@ file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-ksquares.png")
ecm_add_app_icon(ksquares_SRCS ICONS ${ICONS_SRCS})
add_executable(ksquares ${ksquares_SRCS})
target_link_libraries(ksquares KF5KDEGames KF5::I18n KF5::XmlGui KF5::Completion KF5::DBusAddons)
target_link_libraries(ksquares
KF5::Completion
KF5::Crash
KF5::DBusAddons
KF5::I18n
KF5::XmlGui
KF5KDEGames
)
install(TARGETS ksquares ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
install( PROGRAMS org.kde.ksquares.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install( FILES ksquares.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} )
install( FILES ksquaresui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/ksquares )
ecm_install_icons(ICONS 128-apps-ksquares.png 16-apps-ksquares.png 22-apps-ksquares.png 32-apps-ksquares.png 48-apps-ksquares.png 64-apps-ksquares.png DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor )
install(PROGRAMS org.kde.ksquares.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES ksquares.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES ksquaresui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/ksquares)
ecm_install_icons(ICONS
128-apps-ksquares.png
16-apps-ksquares.png
22-apps-ksquares.png
32-apps-ksquares.png
48-apps-ksquares.png
64-apps-ksquares.png
DESTINATION ${KDE_INSTALL_ICONDIR}
THEME hicolor
)
......@@ -8,7 +8,7 @@
***************************************************************************/
#include <KAboutData>
#include <KCrash>
#include <KUser>
#include <QApplication>
#include <KLocalizedString>
......@@ -44,6 +44,7 @@ int main(int argc, char **argv)
QCommandLineParser parser;
KAboutData::setApplicationData(about);
KCrash::initialize();
parser.addVersionOption();
parser.addHelpOption();
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("demo"), i18n("Run game in demo (autoplay) mode")));
......
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