diff --git a/CMakeLists.txt b/CMakeLists.txt index bd48ec0..27e7964 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,65 +1,65 @@ project(kshisen) cmake_minimum_required(VERSION 3.1 FATAL_ERROR) -set(QT_MIN_VERSION "5.2.0") -set(KF5_MIN_VERSION "5.15.0") +set(QT_MIN_VERSION "5.7.0") +set(KF5_MIN_VERSION "5.30.0") set(CMAKE_CXX_STANDARD 14) # C++14... set(CMAKE_CXX_STANDARD_REQUIRED ON) # ...is required... set(CMAKE_CXX_EXTENSIONS OFF) # ...without compiler extensions like gnu++14 # Found this somewhere but cannot re-find it now ... but want to investigate later, so keeping this here for now. #set(CXX_CLANG_TIDY ON) -find_package(ECM 1.7.0 REQUIRED NO_MODULE) +find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) if(ENABLE_CLAZY) set(CMAKE_CXX_COMPILER clazy) endif() set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) find_package(Qt5 ${QT_MIN_VERSION} REQUIRED NO_MODULE COMPONENTS Core Gui) find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS Config Crash DBusAddons DocTools XmlGui ) include(FeatureSummary) include(ECMAddAppIcon) include(GenerateExportHeader) include(CMakePackageConfigHelpers) include(ECMSetupVersion) include(ECMGenerateHeaders) include(ECMMarkNonGuiExecutable) include(KDEInstallDirs) include(ECMInstallIcons) include(KDECompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) find_package(KF5KMahjongglib REQUIRED) find_package(KF5KDEGames 4.9.0 REQUIRED) add_definitions( -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_URL_CAST_FROM_STRING -DQT_USE_QSTRINGBUILDER ) add_subdirectory(src) add_subdirectory(icons) add_subdirectory(sounds) add_subdirectory(doc) install(PROGRAMS org.kde.kshisen.desktop DESTINATION ${KDE_INSTALL_APPDIR}) install(FILES org.kde.kshisen.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR}) ########### Display Summary ############### feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) diff --git a/src/main.cpp b/src/main.cpp index 6d0bdce..72cc80e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,87 +1,85 @@ /*************************************************************************** * KShisen - A japanese game similar to mahjongg * * Copyright 1997 Mario Weilguni * * Copyright 2002-2004 Dave Corrie * * Copyright 2009-2016 Frederik Schwarzer * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * ***************************************************************************/ // STL #include // Qt #include #include // KDE #include #include #include #include #include // KShisen #include "app.h" #include "debug.h" namespace KShisen { Q_LOGGING_CATEGORY(KSHISEN_General, "kshisen") } // namespace KShisen static constexpr char description[] = I18N_NOOP("A KDE game similar to Mahjongg"); int main(int argc, char ** argv) { QApplication a(argc, argv); // Migrate pre-existing (4.x) configuration Kdelibs4ConfigMigrator migrate(QStringLiteral("kshisen")); migrate.setConfigFiles(QStringList() << QStringLiteral("kshisenrc")); migrate.setUiFiles(QStringList() << QStringLiteral("kshisenui.rc")); migrate.migrate(); KLocalizedString::setApplicationDomain("kshisen"); KAboutData aboutData(QStringLiteral("kshisen"), i18n("Shisen-Sho"), QStringLiteral("1.10+ #25"), i18n(description), KAboutLicense::GPL, i18n("Copyright 1997 Mario Weilguni")); aboutData.setHomepage(QStringLiteral("http://games.kde.org/kshisen")); aboutData.addAuthor(i18n("Frederik Schwarzer"), i18n("Current Maintainer"), QStringLiteral("schwarzer@kde.org")); aboutData.addAuthor(i18n("Dave Corrie"), i18n("Former Maintainer"), QStringLiteral("kde@davecorrie.com")); aboutData.addAuthor(i18n("Mario Weilguni"), i18n("Original Author"), QStringLiteral("mweilguni@sime.com")); aboutData.addCredit(i18n("Mauricio Piacentini"), i18n("KMahjonggLib integration for KDE4"), QStringLiteral("mauricio@tabuleiro.com")); aboutData.addCredit(i18n("Jason Lane"), i18n("Added 'tiles removed' counter
Tile smooth-scaling and window resizing"), QStringLiteral("jglane@btopenworld.com")); aboutData.addCredit(i18n("Thanks also to everyone who should be listed here but is not!")); KAboutData::setApplicationData(aboutData); KCrash::initialize(); QCommandLineParser parser; - parser.addVersionOption(); - parser.addHelpOption(); aboutData.setupCommandLine(&parser); parser.process(a); aboutData.processCommandLine(&parser); a.setWindowIcon(QIcon::fromTheme(QStringLiteral("kshisen"))); KDBusService service; auto app = new KShisen::App(); app->show(); return a.exec(); } // vim: expandtab:tabstop=4:shiftwidth=4 // kate: space-indent on; indent-width 4