Commit af9dafd2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compile

parent e92e8c0d
project(konquest)
if(NOT COMPILING_KDEGAMES)
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
include(MacroLibrary)
find_package(KDEGames REQUIRED)
cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
set (QT_MIN_VERSION "5.3.0")
find_package(ECM 1.3.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
Config
DBusAddons
I18n
ConfigWidgets
TextWidgets
XmlGui
KIO
NotifyConfig
NewStuff
KDELibs4Support)
find_package(KF5KDEGames 4.9.0 REQUIRED)
find_package(Phonon4Qt5 CONFIG REQUIRED)
include_directories(BEFORE ${PHONON_INCLUDES})
include(FeatureSummary)
include(ECMInstallIcons)
include(KDEInstallDirs)
include(KDECompilerSettings)
include(KDECMakeSettings)
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
add_definitions(-DTRANSLATION_DOMAIN="konquest")
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
include_directories(${KDEGAMES_INCLUDE_DIRS} ${KDE4_INCLUDES} ${QDBUS_INCLUDE_DIRS})
endif(NOT COMPILING_KDEGAMES)
add_subdirectory( pics )
add_subdirectory( doc )
......@@ -67,12 +95,12 @@ if(KONQUEST_EXAMPLE_PLAYER)
players/ai/example/example_gui.cpp)
endif()
kde4_add_ui_files(konquest_SRCS dialogs/newGameDialog.ui )
ki18n_wrap_ui(konquest_SRCS dialogs/newGameDialog.ui )
kde4_add_app_icon(konquest_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-app-konquest.png")
kde4_add_executable(konquest ${konquest_SRCS})
add_executable(konquest ${konquest_SRCS})
target_link_libraries(konquest ${KDE4_KDEUI_LIBS} kdegames )
target_link_libraries(konquest KF5KDEGames KF5::KDELibs4Support Qt5::Svg)
install(TARGETS konquest ${INSTALL_TARGETS_DEFAULT_ARGS} )
......@@ -82,6 +110,6 @@ install(TARGETS konquest ${INSTALL_TARGETS_DEFAULT_ARGS} )
install( PROGRAMS konquest.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
install( FILES konquestui.rc DESTINATION ${DATA_INSTALL_DIR}/konquest )
kde4_install_icons( ${ICON_INSTALL_DIR} )
ecm_install_icons( ${ICON_INSTALL_DIR} )
......@@ -23,7 +23,7 @@
#include <kapplication.h>
#include <klocale.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <K4AboutData>
#include <kstandarddirs.h>
#include "mainwin.h"
......@@ -34,8 +34,8 @@ static const char description[] = I18N_NOOP("Galactic Strategy KDE Game");
int
main(int argc, char **argv)
{
KAboutData aboutData( "konquest", 0, ki18n("Konquest"),
KONQUEST_VERSION, ki18n(description), KAboutData::License_GPL,
K4AboutData aboutData( "konquest", 0, ki18n("Konquest"),
KONQUEST_VERSION, ki18n(description), K4AboutData::License_GPL,
ki18n("Copyright (c) 1999-2013, Developers"), KLocalizedString(), "http://games.kde.org/konquest" );
aboutData.addAuthor(ki18n("Russ Steffen"), KLocalizedString(), "rsteffen@bayarea.net");
......@@ -48,7 +48,6 @@ main(int argc, char **argv)
KCmdLineArgs::init( argc, argv, &aboutData );
KApplication a;
KGlobal::locale()->insertCatalog( QLatin1String( "libkdegames" ));
if (a.isSessionRestored())
RESTORE(MainWindow)
......
########### install files ###############
#
#
kde4_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR konquest)
kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR konquest)
......@@ -32,7 +32,7 @@
#include <kmenubar.h>
#include <ktoolbar.h>
#include <kiconloader.h>
#include <kaction.h>
#include <QAction>
#include <kactioncollection.h>
#include <kstandardaction.h>
#include <kstandardgameaction.h>
......@@ -85,7 +85,7 @@ MainWindow::setupActions()
m_endGameAction->setEnabled(false);
//AB: there is no icon for disabled - KToolBar::insertButton shows the
//different state - KAction not :-(
//different state - QAction not :-(
m_measureAction = actionCollection()->addAction( QLatin1String( "game_measure" ) );
m_measureAction->setIcon( KIcon( QLatin1String( "go-jump" )) );
m_measureAction->setText( i18n("&Measure Distance") );
......
......@@ -23,7 +23,7 @@
#ifndef KONQUEST_MAINWIN_H
#define KONQUEST_MAINWIN_H
#include <kaction.h>
#include <QAction>
#include <kxmlguiwindow.h>
#include "game.h"
......@@ -61,9 +61,9 @@ private:
QLabel *m_statusBarText;
// Actions
KAction *m_endTurnAction;
KAction *m_messagesAction;
KAction *m_standingsAction;
QAction *m_endTurnAction;
QAction *m_messagesAction;
QAction *m_standingsAction;
QAction *m_endGameAction;
QAction *m_measureAction;
......
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