Commit 71874b11 authored by Frederik Schwarzer's avatar Frederik Schwarzer

Use KCrash.

parent a16d052e
project(kspaceduel)
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.3.0")
set (KF5_MIN_VERSION "5.3.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)
......@@ -39,9 +40,9 @@ include(KDECMakeSettings)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_subdirectory( sprites )
add_subdirectory( pics )
add_subdirectory( doc )
add_subdirectory(sprites)
add_subdirectory(pics)
add_subdirectory(doc)
########### next target ###############
......@@ -54,31 +55,44 @@ set(kspaceduel_SRCS
playerinfo.cpp
sprites.cpp
spritebase.cpp
topwidget.cpp)
topwidget.cpp
)
ki18n_wrap_ui(kspaceduel_SRCS general.ui )
ki18n_wrap_ui(kspaceduel_SRCS general.ui)
kconfig_add_kcfg_files(kspaceduel_SRCS options.kcfgc )
kconfig_add_kcfg_files(kspaceduel_SRCS options.kcfgc)
file(GLOB ICONS_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/*-apps-kspaceduel.png")
ecm_add_app_icon(kspaceduel_SRCS ICONS ${ICONS_SRCS})
add_executable(kspaceduel ${kspaceduel_SRCS})
target_link_libraries(kspaceduel KF5KDEGames KF5::KDELibs4Support Qt5::Svg)
target_link_libraries(kspaceduel
Qt5::Svg
KF5::Crash
KF5::KDELibs4Support
KF5KDEGames
)
install(TARGETS kspaceduel ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
install(FILES default_theme.svgz DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites )
install(TARGETS kspaceduel ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES default_theme.svgz DESTINATION ${KDE_INSTALL_DATADIR}/kspaceduel/sprites)
########### install files ###############
install( PROGRAMS org.kde.kspaceduel.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
install( FILES kspaceduel.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} )
install( FILES kspaceduelui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kspaceduel )
ecm_install_icons( ICONS 128-apps-kspaceduel.png 16-apps-kspaceduel.png 22-apps-kspaceduel.png 32-apps-kspaceduel.png 48-apps-kspaceduel.png 64-apps-kspaceduel.png DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor )
install(PROGRAMS org.kde.kspaceduel.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES kspaceduel.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
install(FILES kspaceduelui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kspaceduel)
ecm_install_icons(ICONS
128-apps-kspaceduel.png
16-apps-kspaceduel.png
22-apps-kspaceduel.png
32-apps-kspaceduel.png
48-apps-kspaceduel.png
64-apps-kspaceduel.png
DESTINATION ${KDE_INSTALL_ICONDIR}
THEME hicolor
)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -19,6 +19,7 @@
#include <kapplication.h>
#include <KAboutData>
#include <KCrash>
#include <KLocalizedString>
#include <QCommandLineParser>
......@@ -33,25 +34,26 @@ int main(int argc,char **argv)
KLocalizedString::setApplicationDomain("kspaceduel");
KAboutData aboutData( "kspaceduel", i18n("KSpaceDuel"),
KSPACEDUEL_VERSION, i18n(description), KAboutLicense::GPL,
i18n("(c) 1998-2001, Andreas Zehender"), "http://games.kde.org/kspaceduel" );
aboutData.addAuthor(i18n("Andreas Zehender"),i18n("Original Program"), "az@azweb.de");
aboutData.addAuthor(i18n("Branan Riley"),i18n("SVG Renderer"), "branan@gmail.com");
KAboutData aboutData( "kspaceduel", i18n("KSpaceDuel"),
KSPACEDUEL_VERSION, i18n(description), KAboutLicense::GPL,
i18n("(c) 1998-2001, Andreas Zehender"), "http://games.kde.org/kspaceduel" );
aboutData.addAuthor(i18n("Andreas Zehender"),i18n("Original Program"), "az@azweb.de");
aboutData.addAuthor(i18n("Branan Riley"),i18n("SVG Renderer"), "branan@gmail.com");
QCommandLineParser parser;
KAboutData::setApplicationData(aboutData);
KCrash::initialize();
parser.addVersionOption();
parser.addHelpOption();
aboutData.setupCommandLine(&parser);
parser.process(app);
aboutData.processCommandLine(&parser);
MyTopLevelWidget *top = new MyTopLevelWidget;
top->show();
top->start();
MyTopLevelWidget *top = new MyTopLevelWidget;
top->show();
top->start();
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kspaceduel")));
app.setWindowIcon(QIcon::fromTheme(QStringLiteral("kspaceduel")));
return app.exec();
return app.exec();
}
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