Commit 6606ec71 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Add Qt6 support

parent 8e1b8b9d
Pipeline #163466 passed with stage
in 1 minute and 31 seconds
......@@ -4,4 +4,5 @@
include:
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml
......@@ -15,7 +15,11 @@ include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
set(REQUIRED_QT_VERSION 5.12.0)
find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Gui)
find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Gui)
if(TARGET Qt6::Core)
find_package(Qt6 REQUIRED COMPONENTS Core5Compat)
endif()
ecm_setup_version("2.0.0"
VARIABLE_PREFIX QMOBIPOCKET
......
......@@ -2,8 +2,8 @@
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
find_dependency(Qt5Core "@REQUIRED_QT_VERSION@")
find_dependency(Qt5Gui "@REQUIRED_QT_VERSION@")
find_dependency(Qt${QT_MAJOR_VERSION}Core "@REQUIRED_QT_VERSION@")
find_dependency(Qt${QT_MAJOR_VERSION}Gui "@REQUIRED_QT_VERSION@")
find_dependency(KF5I18n)
include("${CMAKE_CURRENT_LIST_DIR}/QMobipocketTargets.cmake")
......@@ -9,10 +9,14 @@ add_library(qmobipocket SHARED ${QMOBIPOCKET_SRCS})
generate_export_header(qmobipocket)
target_link_libraries (qmobipocket
Qt5::Core
Qt5::Gui
Qt${QT_MAJOR_VERSION}::Core
Qt${QT_MAJOR_VERSION}::Gui
)
if(TARGET Qt6::Core5Compat)
target_link_libraries(qmobipocket Qt6::Core5Compat)
endif()
install(FILES
mobipocket.h
qfilestream.h
......
......@@ -15,6 +15,7 @@
#include <QBuffer>
#include <QTextCodec>
#include <QtGui/QImageReader>
#include <QRegExp>
namespace Mobipocket {
......
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