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

Split as 2 separates lib

parent 802f4e80
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.4.45")
set(PIM_VERSION "5.4.46")
project(libkdepim VERSION ${PIM_VERSION})
......@@ -64,28 +64,11 @@ if (Qt5Designer_FOUND)
find_package(KF5DesignerPlugin ${KF5_VERSION} CONFIG REQUIRED)
endif()
ecm_setup_version(PROJECT VARIABLE_PREFIX LIBKDEPIM
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libkdepim_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfigVersion.cmake"
SOVERSION 5
)
remove_definitions( -DQT_NO_CAST_FROM_BYTEARRAY )
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Libkdepim")
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5LibkdepimConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
configure_package_config_file(MailTransportDBusServiceConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/MailTransportDBusServiceConfig.cmake
......@@ -96,13 +79,6 @@ install(FILES
${CMAKE_CURRENT_BINARY_DIR}/MailTransportDBusServiceConfig.cmake
DESTINATION "${CMAKECONFIG_INSTALL_PREFIX}/MailTransportDBusService")
install(EXPORT KF5LibkdepimTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5LibkdepimTargets.cmake NAMESPACE KF5::)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libkdepim_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)
add_subdirectory(src)
......
ecm_setup_version(PROJECT VARIABLE_PREFIX LIBKDEPIM
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libkdepim_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfigVersion.cmake"
SOVERSION 5
)
add_subdirectory(pics)
if (BUILD_TESTING)
add_subdirectory(tests)
......@@ -231,3 +238,25 @@ install(FILES ldap/kcmldap.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
########### install files ###############
install(FILES interfaces/org.kde.addressbook.service.xml interfaces/org.kde.mailtransport.service.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR})
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Libkdepim")
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5LibkdepimConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(EXPORT KF5LibkdepimTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5LibkdepimTargets.cmake NAMESPACE KF5::)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libkdepim_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
include("${CMAKE_CURRENT_LIST_DIR}/KF5LibkdepimTargets.cmake")
ecm_setup_version(PROJECT VARIABLE_PREFIX LIBKDEPIM
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/libkdepimakonadi_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimAkonadiConfigVersion.cmake"
SOVERSION 5
)
if(BUILD_TESTING)
add_subdirectory(tests)
......@@ -63,6 +68,8 @@ set(kdepimakonadi_LIB_SRCS
${kdepimakonadi_progresswidget_LIB_SRCS}
)
install(EXPORT KF5LibkdepimAkonadiTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5LibkdepimAkonadiTargets.cmake NAMESPACE KF5::)
ecm_qt_declare_logging_category(kdepimakonadi_LIB_SRCS HEADER libkdepimakonadi_debug.h IDENTIFIER LIBKDEPIMAKONADI_LOG CATEGORY_NAME org.kde.pim.libkdepimakonadi)
......@@ -109,7 +116,7 @@ set_target_properties(KF5LibkdepimAkonadi PROPERTIES
install(TARGETS
KF5LibkdepimAkonadi
EXPORT KF5LibkdepimTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
EXPORT KF5LibkdepimAkonadiTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS} ${LIBRARY_NAMELINK}
)
ecm_generate_headers(libkdepimakonadi_Camelcasewidgets_HEADERS
......@@ -220,3 +227,24 @@ install(FILES
${PRI_FILENAME}
DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5LibkdepimAkonadi")
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5LibkdepimAkonadiConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimAkonadiConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimAkonadiConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5LibkdepimAkonadiConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/libkdepimakonadi_version.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)
......@@ -4,4 +4,4 @@ find_dependency(KF5Akonadi "@AKONADI_VERSION@")
find_dependency(KF5AkonadiContact "@AKONADICONTACT_LIB_VERSION@")
include("${CMAKE_CURRENT_LIST_DIR}/KF5LibkdepimTargets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/KF5LibkdepimAkonadiTargets.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