Commit e32df1d2 authored by Frederik Schwarzer's avatar Frederik Schwarzer

Use KCrash.

parent 879b34fb
project(kreversi)
cmake_minimum_required(VERSION 2.8.12)
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 NO_MODULE)
set(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
Config
DBusAddons
DNSSD
Declarative
I18n
GuiAddons
Service
ConfigWidgets
ItemViews
IconThemes
Completion
XmlGui
KIO
NewStuff
KDELibs4Support
)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Completion
Config
ConfigWidgets
CoreAddons
Crash
DBusAddons
DNSSD
Declarative
GuiAddons
I18n
IconThemes
ItemModels
ItemViews
KDELibs4Support
KIO
NewStuff
Service
WidgetsAddons
XmlGui
)
find_package(KF5KDEGames 4.9.0 REQUIRED)
......@@ -39,12 +41,12 @@ include(KDECMakeSettings)
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
add_subdirectory( pics )
add_subdirectory( sounds )
add_subdirectory( icons )
add_subdirectory( doc )
add_subdirectory(pics)
add_subdirectory(sounds)
add_subdirectory(icons)
add_subdirectory(doc)
include_directories( ${CMAKE_SOURCE_DIR}/libKF5KDEGames/highscore )
include_directories(${CMAKE_SOURCE_DIR}/libKF5KDEGames/highscore)
########### next target ##############
set(kreversi_SRCS
......@@ -64,7 +66,8 @@ set(kreversi_SRCS
kexthighscore_item.cpp
kexthighscore_tab.cpp
mainwindow.cpp
main.cpp )
main.cpp
)
ki18n_wrap_ui(kreversi_SRCS startgamedialog.ui)
......@@ -72,14 +75,25 @@ kconfig_add_kcfg_files(kreversi_SRCS preferences.kcfgc)
add_executable(kreversi ${kreversi_SRCS})
target_link_libraries(kreversi Qt5::Svg KF5::Declarative KF5::XmlGui KF5::TextWidgets KF5KDEGames KF5::Completion KF5::DBusAddons KF5::KDELibs4Support)
target_link_libraries(kreversi
Qt5::Svg
KF5::Completion
KF5::Crash
KF5::DBusAddons
KF5::Declarative
KF5::KDELibs4Support
KF5::TextWidgets
KF5::XmlGui
KF5KDEGames
)
install(TARGETS kreversi ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
install(TARGETS kreversi ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
########### install files ###############
install( PROGRAMS org.kde.kreversi.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
#install( FILES kreversi.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} )
install( FILES kreversiui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kreversi )
install( DIRECTORY qml DESTINATION ${KDE_INSTALL_DATADIR}/kreversi )
install(PROGRAMS org.kde.kreversi.desktop DESTINATION ${KDE_INSTALL_APPDIR})
#install(FILES kreversi.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES kreversiui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kreversi)
install(DIRECTORY qml DESTINATION ${KDE_INSTALL_DATADIR}/kreversi)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -25,6 +25,7 @@
#include <QApplication>
#include <KLocalizedString>
#include <KAboutData>
#include <KCrash>
#include <QCommandLineParser>
#include <highscores.h>
......@@ -62,6 +63,7 @@ int main(int argc, char **argv)
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
KCrash::initialize();
parser.addVersionOption();
parser.addHelpOption();
parser.addOption(QCommandLineOption(QStringList() << QStringLiteral("demo"), i18n("Start with demo game playing")));
......
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