Commit 4f1ace04 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Prepare to build against qt6

parent 5e2dfbf5
Pipeline #131934 passed with stage
in 44 seconds
......@@ -10,12 +10,23 @@ set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_
project(kiten VERSION ${RELEASE_SERVICE_VERSION})
#ECM setup
set(KF5_MIN_VERSION "5.83.0")
set(KF5_MIN_VERSION "5.90.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.82")
set(QT_REQUIRED_VERSION "5.15.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMInstallIcons)
include(CheckIncludeFiles)
include(ECMGenerateHeaders)
include(ECMAddAppIcon)
include(ECMMarkNonGuiExecutable)
include(GenerateExportHeader)
include(ECMSetupVersion)
find_package(Qt5 ${QT_REQUIRED_VERSION} REQUIRED COMPONENTS Core Widgets)
find_package(Qt${QT_MAJOR_VERSION} ${QT_REQUIRED_VERSION} REQUIRED COMPONENTS Core Widgets)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
Archive
Completion
......@@ -28,16 +39,9 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
KIO
Notifications
XmlGui)
include(KDEInstallDirs)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDECMakeSettings)
include(ECMInstallIcons)
include(CheckIncludeFiles)
include(ECMGenerateHeaders)
include(ECMAddAppIcon)
include(ECMMarkNonGuiExecutable)
include(GenerateExportHeader)
include(ECMSetupVersion)
if (QT_MAJOR_VERSION STREQUAL "6")
find_package(Qt6Core5Compat)
endif()
## Make it easy for radselect and kiten to find libkiten headers
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/lib)
......@@ -80,7 +84,7 @@ add_subdirectory( radselect )
set(kitengen_SRCS xjdxgen.c)
add_executable(kitengen ${kitengen_SRCS})
ecm_mark_nongui_executable(kitengen)
target_link_libraries(kitengen ${QT_QTCORE_LIBRARY})
target_link_libraries(kitengen Qt::Core)
install( TARGETS kitengen ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
install(FILES org.kde.kiten.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
ki18n_install(po)
......
......@@ -15,7 +15,7 @@ add_executable(kanjibrowser_bin ${kanjibrowser_bin_SRCS})
set_target_properties(kanjibrowser_bin PROPERTIES OUTPUT_NAME kitenkanjibrowser)
target_link_libraries(kanjibrowser_bin
kiten
Qt5::Widgets
Qt::Widgets
KF5::Completion
KF5::I18n
KF5::XmlGui)
......
......@@ -27,14 +27,17 @@ add_library(kiten SHARED ${kiten_LIB_SRCS})
generate_export_header(kiten)
target_link_libraries(kiten
Qt5::Core
Qt5::Widgets
Qt::Core
Qt::Widgets
KF5::Completion
KF5::ConfigCore
KF5::ConfigGui
KF5::CoreAddons
KF5::I18n
KF5::WidgetsAddons)
if (QT_MAJOR_VERSION STREQUAL "6")
target_link_libraries(kiten Qt6::Core5Compat)
endif()
if(WIN32)
target_include_directories(kiten PRIVATE ${MMAN_INCLUDE_PATH})
......
......@@ -19,7 +19,7 @@
#include "linearedictfile.h"
#include <QMap>
#include <QStringList>
#include <sys/types.h>
class Deinflection;
......@@ -28,8 +28,6 @@ class DictionaryPreferenceDialog;
class EntryEdict;
class KConfigSkeleton;
class KConfigSkeletonItem;
class QString;
class QStringList;
class KITEN_EXPORT DictFileEdict : public DictFile
{
......
......@@ -13,11 +13,9 @@
#include "dictionarypreferencedialog.h"
#include <QWidget>
#include <QStringList>
class KActionSelector;
class KConfigSkeleton;
class QString;
class QStringList;
//This is the default one used by edict and kanjidic
class DictFileFieldSelector : public DictionaryPreferenceDialog
......
......@@ -11,7 +11,7 @@
#include "kiten_export.h"
#include <QMap>
#include <QString>
#include <QStringList>
class DictQuery;
class DictionaryPreferenceDialog;
......@@ -19,7 +19,6 @@ class Entry;
class EntryList;
class KConfig;
class KConfigSkeleton;
class QStringList;
class QWidget;
/**
......
......@@ -13,6 +13,7 @@
#include <QMap>
#include <QPair>
#include <QStringList>
class DictFile;
class DictQuery;
......@@ -20,8 +21,6 @@ class DictionaryPreferenceDialog;
class EntryList;
class KConfig;
class KConfigSkeleton;
class QString;
class QStringList;
class QWidget;
/**
......
......@@ -18,6 +18,7 @@
#include <QMenu>
#include <QStandardPaths>
#include <QTextCodec>
#include <QActionGroup>
#include <QTextStream>
KRomajiEdit::KRomajiEdit( QWidget *parent)
......
......@@ -17,8 +17,8 @@ add_executable(radselect_bin ${radselect_bin_SRCS})
set_target_properties(radselect_bin PROPERTIES OUTPUT_NAME kitenradselect)
target_link_libraries(radselect_bin
kiten
Qt5::Core
Qt5::Widgets
Qt::Core
Qt::Widgets
KF5::ConfigWidgets
KF5::CoreAddons
KF5::I18n
......
Supports Markdown
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