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

Adapt build system for building against qt6

(cherry picked from commit 651793a62f798c496f1934cd3278da26b6d62c33)
parent 0851d7ba
Pipeline #120982 passed with stage
in 1 minute and 58 seconds
......@@ -45,8 +45,10 @@ ecm_setup_version(PROJECT VARIABLE_PREFIX KSMTP
############ Find packages ############
find_package(Qt5Network ${QT_REQUIRED_VERSION} REQUIRED)
find_package(Qt${QT_MAJOR_VERSION}Network ${QT_REQUIRED_VERSION} REQUIRED)
if (QT_MAJOR_VERSION STREQUAL "6")
find_package(Qt6Core5Compat)
endif()
find_package(KF5CoreAddons ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5I18n ${KF5_MIN_VERSION} CONFIG REQUIRED)
find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG REQUIRED)
......
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
include(ECMAddTests)
find_package(Qt5Test ${QT_REQUIRED_VERSION} REQUIRED)
find_package(Qt${QT_MAJOR_VERSION}Test ${QT_REQUIRED_VERSION} REQUIRED)
ecm_add_test(smtptest.cpp fakeserver.cpp smtptest.h fakeserver.h
LINK_LIBRARIES KPimSMTP Qt::Test Qt::Network
LINK_LIBRARIES KPimSMTP Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Network
TEST_NAME smtptest
)
......@@ -43,7 +43,7 @@ PUBLIC
PRIVATE
KF5::I18n
KF5::KIOCore
Qt::Network
Qt${QT_MAJOR_VERSION}::Network
Sasl2::Sasl2
${extra_LIBS}
)
......
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: BSD-3-Clause
add_executable(logintest logintest.cpp)
target_link_libraries(logintest KPimSMTP Qt::Core KF5::KIOWidgets)
target_link_libraries(logintest KPimSMTP Qt${QT_MAJOR_VERSION}::Core KF5::KIOWidgets)
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