Commit 844e62cb authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Split lib

parent 96c3fd1c
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.4.46")
set(PIM_VERSION "5.4.47")
project(MailTransport VERSION ${PIM_VERSION})
......@@ -32,12 +32,6 @@ set(AKONADI_LIB_VERSION "5.4.40")
set(AKONADIMIME_LIB_VERSION "5.4.40")
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5MailTransport")
ecm_setup_version(PROJECT VARIABLE_PREFIX MAILTRANSPORT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/mailtransport_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfigVersion.cmake"
SOVERSION 5
)
########### Find packages ###########
find_package(KF5KCMUtils ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5ConfigWidgets ${KF5_VERSION} CONFIG REQUIRED)
......@@ -58,28 +52,6 @@ set_package_properties(Sasl2 PROPERTIES
TYPE OPTIONAL
)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5MailTransportConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransport_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}
COMPONENT Devel
)
install(EXPORT KF5MailTransportTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5MailTransportTargets.cmake NAMESPACE KF5::)
########### Targets ###########
add_subdirectory(cmake)
add_subdirectory(src)
......
ecm_setup_version(PROJECT VARIABLE_PREFIX MAILTRANSPORT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/mailtransport_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfigVersion.cmake"
SOVERSION 5
)
set(mailtransport_lib_srcs
transport.cpp
transportmanager.cpp
......@@ -109,3 +118,25 @@ install(FILES
ecm_generate_pri_file(BASE_NAME KMailTransport LIB_NAME KF5MailTransport DEPS "Wallet" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport/)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5MailTransport")
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5MailTransportConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(EXPORT KF5MailTransportTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5MailTransportTargets.cmake NAMESPACE KF5::)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransport_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)
......@@ -3,8 +3,6 @@
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
include(CMakeFindDependencyMacro)
find_dependency(KF5Wallet "@KF5_VERSION@")
find_dependency(KF5AkonadiMime "@AKONADIMIME_LIB_VERSION@")
find_dependency(KF5Mime "@KMIME_LIB_VERSION@")
find_dependency(Sasl2)
......
ecm_setup_version(PROJECT VARIABLE_PREFIX MAILTRANSPORT
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/mailtransportakonadi_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportAkonadiConfigVersion.cmake"
SOVERSION 5
)
set(mailtransportakonadi_lib_srcs
dispatcherinterface.cpp
attributeregistrar.cpp
......@@ -47,7 +56,7 @@ set_target_properties(KF5MailTransportAkonadi PROPERTIES
)
install(TARGETS KF5MailTransportAkonadi EXPORT KF5MailTransportTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS KF5MailTransportAkonadi EXPORT KF5MailTransportAkonadiTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
ecm_generate_headers(MailTransport_kmailtransportakonadi_CamelCase_HEADERS
HEADER_NAMES
......@@ -73,6 +82,29 @@ install(FILES
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/mailtransportakonadi COMPONENT Devel
)
ecm_generate_pri_file(BASE_NAME KMailTransport LIB_NAME KF5MailTransportAkonadi DEPS "Wallet AkonadiCore Mime AkonadiMime" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransportAkonadi/)
ecm_generate_pri_file(BASE_NAME KMailTransportAkonadi LIB_NAME KF5MailTransportAkonadi DEPS "MailTransport AkonadiCore Mime AkonadiMime" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransportAkonadi/)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5MailTransportAkonadi")
install(EXPORT KF5MailTransportAkonadiTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5MailTransportAkonadiTargets.cmake NAMESPACE KF5::)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5MailTransportAkonadiConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportAkonadiConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportAkonadiConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailTransportAkonadiConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransportakonadi_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)
@PACKAGE_INIT@
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
include(CMakeFindDependencyMacro)
find_dependency(KF5AkonadiMime "@AKONADIMIME_LIB_VERSION@")
find_dependency(KF5Mime "@KMIME_LIB_VERSION@")
find_dependency(KF5MailTransport "@PIM_VERSION@")
include("${CMAKE_CURRENT_LIST_DIR}/KF5MailTransportAkonadiTargets.cmake")
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