Commit 9829d9b8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt build system for building against qt6

parent 04bbe603
Pipeline #121305 passed with stage
in 1 minute and 17 seconds
......@@ -69,7 +69,7 @@ endif()
generate_export_header(KF5MailTransport BASE_NAME mailtransport)
target_include_directories(KF5MailTransport INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport;${KDE_INSTALL_INCLUDEDIR_KF5}/mailtransport>")
target_include_directories(KF5MailTransport INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/MailTransport;${KDE_INSTALL_INCLUDEDIR_KF}/mailtransport>")
target_include_directories(KF5MailTransport PUBLIC "$<BUILD_INTERFACE:${MailTransport_SOURCE_DIR}/src;${MailTransport_BINARY_DIR}/src>")
target_link_libraries(KF5MailTransport
......@@ -82,8 +82,8 @@ target_link_libraries(KF5MailTransport
KF5::CoreAddons
KF5::Wallet
KF5::ConfigWidgets
Qt::DBus
Qt::Network
Qt${QT_MAJOR_VERSION}::DBus
Qt${QT_MAJOR_VERSION}::Network
qt5keychain
)
......@@ -131,13 +131,13 @@ ecm_generate_headers(MailTransport_plugins_CamelCase_HEADERS
install(FILES
${MailTransport_SOURCE_DIR}/src/kmailtransport/widgets/transportconfigwidget_p.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/mailtransport/private COMPONENT Devel )
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/mailtransport/private COMPONENT Devel )
install(FILES
${MailTransport_CamelCase_HEADERS}
${MailTransport_widgets_CamelCase_HEADERS}
${MailTransport_plugins_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport/ COMPONENT Devel )
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/MailTransport/ COMPONENT Devel )
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransport_export.h
......@@ -146,10 +146,10 @@ install(FILES
${MailTransport_plugins_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/transportbase.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/mailtransport COMPONENT Devel
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/mailtransport COMPONENT Devel
)
ecm_generate_pri_file(BASE_NAME KMailTransport LIB_NAME KF5MailTransport DEPS "KWallet" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport/)
ecm_generate_pri_file(BASE_NAME KMailTransport LIB_NAME KF5MailTransport DEPS "KWallet" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/MailTransport/)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
......@@ -172,7 +172,7 @@ install(EXPORT KF5MailTransportTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransport_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF} COMPONENT Devel
)
......
......@@ -6,8 +6,8 @@ ecm_add_test(smtpjobtest.cpp
../smtpjob.cpp
${CMAKE_CURRENT_BINARY_DIR}/../mailtransportplugin_smtp_debug.cpp
fakeserver.cpp
LINK_LIBRARIES Qt::Network
Qt::Test
LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Network
Qt${QT_MAJOR_VERSION}::Test
KF5::MailTransport
KF5::I18n
KF5::ConfigWidgets
......
......@@ -5,13 +5,13 @@ find_package(KF5TextWidgets ${KF5_MIN_VERSION} CONFIG REQUIRED)
add_executable(transportmgr transportmgr.cpp)
ecm_mark_as_test(transportmgr)
target_link_libraries(transportmgr KF5MailTransport Qt::Widgets KF5::I18n KF5::ConfigGui KF5::TextWidgets KF5::CoreAddons)
target_link_libraries(transportmgr KF5MailTransport Qt${QT_MAJOR_VERSION}::Widgets KF5::I18n KF5::ConfigGui KF5::TextWidgets KF5::CoreAddons)
add_executable(servertest servertest.cpp)
ecm_mark_as_test(servertest)
target_link_libraries(servertest KF5MailTransport KF5::I18n KF5::ConfigGui Qt::Widgets)
target_link_libraries(servertest KF5MailTransport KF5::I18n KF5::ConfigGui Qt${QT_MAJOR_VERSION}::Widgets)
add_executable(addtransportdialogng_gui addtransportdialogng_gui.cpp)
ecm_mark_as_test(addtransportdialogng_gui)
target_link_libraries(addtransportdialogng_gui KF5MailTransport KF5::I18n KF5::ConfigGui Qt::Widgets)
target_link_libraries(addtransportdialogng_gui KF5MailTransport KF5::I18n KF5::ConfigGui Qt${QT_MAJOR_VERSION}::Widgets)
......@@ -46,7 +46,7 @@ if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
endif()
generate_export_header(KF5MailTransportAkonadi BASE_NAME mailtransportakonadi)
target_include_directories(KF5MailTransportAkonadi INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransportAkonadi;${KDE_INSTALL_INCLUDEDIR_KF5}/mailtransportakonadi>")
target_include_directories(KF5MailTransportAkonadi INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/MailTransportAkonadi;${KDE_INSTALL_INCLUDEDIR_KF}/mailtransportakonadi>")
target_include_directories(KF5MailTransportAkonadi PUBLIC "$<BUILD_INTERFACE:${MailTransport_SOURCE_DIR}/src;${MailTransport_BINARY_DIR}/src>")
......@@ -86,16 +86,16 @@ ecm_generate_headers(MailTransport_kmailtransportakonadi_CamelCase_HEADERS
install(FILES
${MailTransport_kmailtransportakonadi_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransportAkonadi COMPONENT Devel )
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/MailTransportAkonadi COMPONENT Devel )
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransportakonadi_export.h
${MailTransport_kmailtransportakonadi_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/mailtransportakonadi COMPONENT Devel
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/mailtransportakonadi COMPONENT Devel
)
ecm_generate_pri_file(BASE_NAME KMailTransportAkonadi LIB_NAME KF5MailTransportAkonadi DEPS "KMailTransport AkonadiCore KMime AkonadiMime" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransportAkonadi/)
ecm_generate_pri_file(BASE_NAME KMailTransportAkonadi LIB_NAME KF5MailTransportAkonadi DEPS "KMailTransport AkonadiCore KMime AkonadiMime" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF}/MailTransportAkonadi/)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
......@@ -119,7 +119,7 @@ install(FILES
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransportakonadi_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF} COMPONENT Devel
)
if(BUILD_TESTING)
......
......@@ -22,5 +22,5 @@ target_link_libraries(mailtransport_akonadiplugin
KF5::AkonadiWidgets
KF5::I18n
KF5::ConfigWidgets
Qt::DBus
Qt${QT_MAJOR_VERSION}::DBus
)
......@@ -6,20 +6,20 @@ find_package(KF5TextWidgets ${KF5_MIN_VERSION} CONFIG REQUIRED)
set(queuer_srcs queuer.cpp)
add_executable(queuer ${queuer_srcs})
ecm_mark_as_test(queuer)
target_link_libraries(queuer KF5MailTransportAkonadi Qt::Widgets KF5::I18n KF5::ConfigGui KF5::TextWidgets)
target_link_libraries(queuer KF5MailTransportAkonadi Qt${QT_MAJOR_VERSION}::Widgets KF5::I18n KF5::ConfigGui KF5::TextWidgets)
set( sendqueued_srcs sendqueued.cpp )
add_executable( sendqueued ${sendqueued_srcs} )
ecm_mark_as_test(sendqueued)
target_link_libraries( sendqueued KF5MailTransportAkonadi KF5::AkonadiMime Qt::Widgets)
target_link_libraries( sendqueued KF5MailTransportAkonadi KF5::AkonadiMime Qt${QT_MAJOR_VERSION}::Widgets)
set( clearerror_srcs clearerror.cpp )
add_executable( clearerror ${clearerror_srcs} )
ecm_mark_as_test(clearerror)
target_link_libraries( clearerror KF5MailTransportAkonadi KF5::AkonadiMime Qt::Widgets)
target_link_libraries( clearerror KF5MailTransportAkonadi KF5::AkonadiMime Qt${QT_MAJOR_VERSION}::Widgets)
set( abort_srcs abort.cpp )
add_executable( abort ${abort_srcs} )
ecm_mark_as_test(abort)
target_link_libraries( abort KF5MailTransportAkonadi KF5::AkonadiCore Qt::Widgets)
target_link_libraries( abort KF5MailTransportAkonadi KF5::AkonadiCore Qt${QT_MAJOR_VERSION}::Widgets)
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