Commit 31a34465 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 0768a83f
Pipeline #156314 passed with stage
in 1 minute and 29 seconds
......@@ -13,7 +13,7 @@ set(KONVERSATION_VERSION "${KONVERSATION_BASE_VERSION}.${RELEASE_SERVICE_COMPACT
project(konversation VERSION ${KONVERSATION_VERSION})
set(QT_MIN_VERSION "5.15.0")
set(KF5_MIN_VERSION "5.88.0")
set(KF5_MIN_VERSION "5.90.0")
set(KDE_COMPILERSETTINGS_LEVEL "5.85")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
......@@ -28,7 +28,7 @@ include(ECMSetupVersion)
include(ECMGenerateDBusServiceFile)
include(FeatureSummary)
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Multimedia Network Widgets)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED Core Multimedia Network Widgets)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
Archive
......@@ -67,13 +67,13 @@ elseif(KF5_MIN_VERSION VERSION_GREATER 5.90)
message(AUTHOR_WARNING "Please remove usage of Qt5X11Extras and HAVE_X11, no longer needed.")
endif()
find_package(Qca-qt5 2.2.0)
set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Support for encryption"
find_package(Qca-qt${QT_MAJOR_VERSION} 2.2.0)
set_package_properties(Qca-qt${QT_MAJOR_VERSION} PROPERTIES DESCRIPTION "Support for encryption"
URL "https://download.kde.org/stable/qca/"
TYPE OPTIONAL)
check_include_file("stropts.h" HAVE_STROPTS_H)
set(HAVE_QCA2 ${Qca-qt5_FOUND})
set(HAVE_QCA2 ${Qca-qt${QT_MAJOR_VERSION}_FOUND})
if(TARGET Qt5::X11Extras)
set(HAVE_X11 TRUE)
else()
......
......@@ -12,7 +12,7 @@ ecm_generate_dbus_service_file(
########### install files ###############
install(PROGRAMS org.kde.konversation.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES konversation.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR})
install(FILES konversation.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR})
install(FILES updaters/konversation.upd DESTINATION ${KDE_INSTALL_DATADIR}/kconf_update)
install(PROGRAMS updaters/konversation-0.19-colors.pl
updaters/konversation-0.19-sortorder.pl
......
......@@ -194,10 +194,10 @@ ki18n_wrap_ui(dcc_SRCS
dcc/whiteboardfontchooserui.ui
)
if (Qca-qt5_FOUND)
if (Qca-qt${QT_MAJOR_VERSION}_FOUND)
set(cipher_SRCS
cipher.cpp)
endif (Qca-qt5_FOUND)
endif ()
set(upnp_SRCS
upnp/soap.cpp
......@@ -239,8 +239,8 @@ add_executable(konversation ${konversation_SRCS})
target_link_libraries(konversation
Qt::Multimedia
Qt5::Network
Qt5::Widgets
Qt::Network
Qt::Widgets
KF5::Archive
KF5::Bookmarks
KF5::ConfigWidgets
......@@ -269,8 +269,8 @@ if(TARGET KF5::GlobalAccel)
target_link_libraries(konversation KF5::GlobalAccel)
endif()
if (Qca-qt5_FOUND)
target_link_libraries(konversation qca-qt5)
if (Qca-qt${QT_MAJOR_VERSION}_FOUND)
target_link_libraries(konversation qca-qt${QT_MAJOR_VERSION})
endif ()
if (WIN32)
target_link_libraries(konversation ws2_32) # for symbols from winsock2.h: ntohl, etc.
......
......@@ -74,7 +74,7 @@ namespace Konversation
startPos = pair.first + pair.second;
line += text.midRef(pair.first, pair.second);
line += QStringView(text).mid(pair.first, pair.second);
}
if (startPos <= text.length() - 1)
......
find_package(Qt5Test ${QT_MIN_VERSION} CONFIG REQUIRED)
find_package(Qt${QT_MAJOR_VERSION}Test ${QT_MIN_VERSION} CONFIG REQUIRED)
include(ECMAddTests)
......@@ -7,6 +7,6 @@ ecm_add_test(
../src/common.cpp
config/preferences.cpp
TEST_NAME testcommon
LINK_LIBRARIES KF5::I18n Qt5::Test
LINK_LIBRARIES KF5::I18n Qt::Test
)
target_include_directories(testcommon PRIVATE ${CMAKE_SOURCE_DIR}/src)
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