Commit d1151bba authored by Laurent Montel's avatar Laurent Montel 😁

Move file in src directory

parent 3a1950d1
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
cmake_minimum_required(VERSION 2.8.12)
find_package(KF5 NO_MODULE REQUIRED COMPONENTS KIO KCMUtils KDE4Support)
project(KontactInterface)
include_directories(
${Boost_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/akonadi
${CMAKE_BINARY_DIR}/akonadi/kmime
${CMAKE_BINARY_DIR}/kmime
)
# ECM setup
find_package(ECM 0.0.11 CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
option(MAILTRANSPORT_INPROCESS_SMTP "false" "Use in-process SMTP instead of KIO slaves (note that this changes the mailtransport license from LGPL to GPL!)")
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings)
add_subdirectory(kconf_update)
add_subdirectory(tests)
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5324)
add_definitions(-DUSES_DEPRECATED_MAILTRANSPORT_API) # for transportmanager
add_definitions(
-DMAILTRANSPORT_DEPRECATED=
)
# This one won't be needed when CMake 2.8.13 is depended on.
add_definitions(
-DMAILTRANSPORT_DEPRECATED_EXPORT=MAILTRANSPORT_EXPORT
)
if(MAILTRANSPORT_INPROCESS_SMTP)
add_definitions("-DMAILTRANSPORT_INPROCESS_SMTP")
include_directories(${SASL2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/kioslave)
set(mailtransport_lib_srcs
../kioslave/smtp/command.cpp
../kioslave/smtp/capabilities.cpp
../kioslave/smtp/request.cpp
../kioslave/smtp/response.cpp
../kioslave/smtp/transactionstate.cpp
../kioslave/smtp/smtpsessioninterface.cpp
smtp/smtpsession.cpp
)
endif()
set(mailtransport_lib_srcs
${mailtransport_lib_srcs}
transport.cpp
transportmanager.cpp
transporttype.cpp
transportcombobox.cpp
transportconfigwidget.cpp
filteractionjob.cpp
transportjob.cpp
resourcesendjob.cpp
sendmailjob.cpp
smtpjob.cpp
precommandjob.cpp
legacydecrypt.cpp
socket.cpp
servertest.cpp
dispatcherinterface.cpp
messagequeuejob.cpp
outboxactions.cpp
attributeregistrar.cpp
dispatchmodeattribute.cpp
errorattribute.cpp
sentactionattribute.cpp
sentbehaviourattribute.cpp
transportattribute.cpp
transportconfigdialog.cpp
sendmailconfigwidget.cpp
smtpconfigwidget.cpp
transportlistview.cpp
transportmanagementwidget.cpp
addtransportdialog.cpp
)
# FIXME: Do we want the same versions in kdepimlibs and kf5?
set(KF5_VERSION "4.97.0")
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5MailTransport")
kde4_add_ui_files(mailtransport_lib_srcs
sendmailsettings.ui
addtransportdialog.ui
transportmanagementwidget.ui
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX MAILTRANSPORT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/mailtransport_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfigVersion.cmake"
SOVERSION 5
)
if(KDEPIM_MOBILE_UI)
kde4_add_ui_files(mailtransport_lib_srcs smtpsettings_mobile.ui)
else()
kde4_add_ui_files(mailtransport_lib_srcs smtpsettings_desktop.ui)
endif()
kde4_add_kcfg_files(mailtransport_lib_srcs transportbase.kcfgc)
add_library(mailtransport ${LIBRARY_TYPE} ${mailtransport_lib_srcs})
target_link_libraries(mailtransport KF5::KIOCore KF5::ItemViews KF5::KDE4Support akonadi-kde akonadi-kmime kmime)
if(MAILTRANSPORT_INPROCESS_SMTP)
target_link_libraries(mailtransport ${SASL2_LIBRARIES} kpimutils)
endif()
########### Find packages ###########
find_package(KF5KDE4Support ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5PimUtils ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5Parts ${KF5_VERSION} CONFIG REQUIRED)
set_target_properties(mailtransport PROPERTIES
VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION}
ecm_configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5MailTransportConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(TARGETS mailtransport EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES mailtransport.kcfg DESTINATION ${KCFG_INSTALL_DIR})
set(mailtransport_kcm_srcs configmodule.cpp)
kde4_add_plugin(kcm_mailtransport ${mailtransport_kcm_srcs})
target_link_libraries(kcm_mailtransport KF5::KCMUtils mailtransport)
install(TARGETS kcm_mailtransport DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES kcm_mailtransport.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransport_export.h
transportjob.h
sendmailjob.h
smtpjob.h
precommandjob.h
socket.h
${CMAKE_CURRENT_BINARY_DIR}/transportbase.h
transport.h
transportmanager.h
transporttype.h
servertest.h
install(EXPORT KF5MailTransportTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5MailTransportTargets.cmake NAMESPACE KF5::)
transportcombobox.h
transportconfigdialog.h
transportmanagementwidget.h
dispatcherinterface.h
messagequeuejob.h
dispatchmodeattribute.h
errorattribute.h
sentactionattribute.h
sentbehaviourattribute.h
transportattribute.h
DESTINATION ${INCLUDE_INSTALL_DIR}/mailtransport COMPONENT Devel
)
add_subdirectory(src)
add_subdirectory(tests)
if ("${CMAKE_BINARY_DIR}" STREQUAL "${KontactInterface_BINARY_DIR}")
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
endif()
@PACKAGE_INIT@
find_dependency(KF5KDE4Support "@KF5_VERSION@")
include("${CMAKE_CURRENT_LIST_DIR}/KF5KontactInterfaceTargets.cmake")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
find_package(KF5 NO_MODULE REQUIRED COMPONENTS KIO KCMUtils KDE4Support)
include_directories(
${Boost_INCLUDE_DIR}
${CMAKE_BINARY_DIR}/akonadi
${CMAKE_BINARY_DIR}/akonadi/kmime
${CMAKE_BINARY_DIR}/kmime
)
option(MAILTRANSPORT_INPROCESS_SMTP "false" "Use in-process SMTP instead of KIO slaves (note that this changes the mailtransport license from LGPL to GPL!)")
add_subdirectory(kconf_update)
add_subdirectory(tests)
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5324)
add_definitions(-DUSES_DEPRECATED_MAILTRANSPORT_API) # for transportmanager
add_definitions(
-DMAILTRANSPORT_DEPRECATED=
)
# This one won't be needed when CMake 2.8.13 is depended on.
add_definitions(
-DMAILTRANSPORT_DEPRECATED_EXPORT=MAILTRANSPORT_EXPORT
)
if(MAILTRANSPORT_INPROCESS_SMTP)
add_definitions("-DMAILTRANSPORT_INPROCESS_SMTP")
include_directories(${SASL2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/kioslave)
set(mailtransport_lib_srcs
../kioslave/smtp/command.cpp
../kioslave/smtp/capabilities.cpp
../kioslave/smtp/request.cpp
../kioslave/smtp/response.cpp
../kioslave/smtp/transactionstate.cpp
../kioslave/smtp/smtpsessioninterface.cpp
smtp/smtpsession.cpp
)
endif()
set(mailtransport_lib_srcs
${mailtransport_lib_srcs}
transport.cpp
transportmanager.cpp
transporttype.cpp
transportcombobox.cpp
transportconfigwidget.cpp
filteractionjob.cpp
transportjob.cpp
resourcesendjob.cpp
sendmailjob.cpp
smtpjob.cpp
precommandjob.cpp
legacydecrypt.cpp
socket.cpp
servertest.cpp
dispatcherinterface.cpp
messagequeuejob.cpp
outboxactions.cpp
attributeregistrar.cpp
dispatchmodeattribute.cpp
errorattribute.cpp
sentactionattribute.cpp
sentbehaviourattribute.cpp
transportattribute.cpp
transportconfigdialog.cpp
sendmailconfigwidget.cpp
smtpconfigwidget.cpp
transportlistview.cpp
transportmanagementwidget.cpp
addtransportdialog.cpp
)
kde4_add_ui_files(mailtransport_lib_srcs
sendmailsettings.ui
addtransportdialog.ui
transportmanagementwidget.ui
)
if(KDEPIM_MOBILE_UI)
kde4_add_ui_files(mailtransport_lib_srcs smtpsettings_mobile.ui)
else()
kde4_add_ui_files(mailtransport_lib_srcs smtpsettings_desktop.ui)
endif()
kde4_add_kcfg_files(mailtransport_lib_srcs transportbase.kcfgc)
add_library(mailtransport ${LIBRARY_TYPE} ${mailtransport_lib_srcs})
target_link_libraries(mailtransport KF5::KIOCore KF5::ItemViews KF5::KDE4Support akonadi-kde akonadi-kmime kmime)
if(MAILTRANSPORT_INPROCESS_SMTP)
target_link_libraries(mailtransport ${SASL2_LIBRARIES} kpimutils)
endif()
set_target_properties(mailtransport PROPERTIES
VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION}
)
install(TARGETS mailtransport EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES mailtransport.kcfg DESTINATION ${KCFG_INSTALL_DIR})
set(mailtransport_kcm_srcs configmodule.cpp)
kde4_add_plugin(kcm_mailtransport ${mailtransport_kcm_srcs})
target_link_libraries(kcm_mailtransport KF5::KCMUtils mailtransport)
install(TARGETS kcm_mailtransport DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES kcm_mailtransport.desktop DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransport_export.h
transportjob.h
sendmailjob.h
smtpjob.h
precommandjob.h
socket.h
${CMAKE_CURRENT_BINARY_DIR}/transportbase.h
transport.h
transportmanager.h
transporttype.h
servertest.h
transportcombobox.h
transportconfigdialog.h
transportmanagementwidget.h
dispatcherinterface.h
messagequeuejob.h
dispatchmodeattribute.h
errorattribute.h
sentactionattribute.h
sentbehaviourattribute.h
transportattribute.h
DESTINATION ${INCLUDE_INSTALL_DIR}/mailtransport COMPONENT Devel
)
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