Commit 3de534fe authored by Christophe Giboudeaux's avatar Christophe Giboudeaux
Browse files

KF5'ify kpimidentities.

Doesn't build yet, there are circular deps to fix elsewhere first.
parent 16810a8f
cmake_minimum_required(VERSION 2.8.12)
find_package(KF5 NO_MODULE REQUIRED COMPONENTS CoreAddons KIO Sonnet)
add_definitions( -DQT_NO_CAST_TO_ASCII )
project(KPimIdentities)
set(kpimidentities_LIB_SRCS identitymanager.cpp identity.cpp signature.cpp signatureconfigurator.cpp identitycombo.cpp)
# ECM setup
find_package(ECM 0.0.11 CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
add_subdirectory( tests )
include(GenerateExportHeader)
include(ECMGenerateHeaders)
include(ECMGeneratePriFile)
include(ECMPackageConfigHelpers)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDEFrameworkCompilerSettings)
qt4_add_dbus_adaptor(kpimidentities_LIB_SRCS org.kde.pim.IdentityManager.xml identitymanager.h KPIMIdentities::IdentityManager )
include_directories(
${CMAKE_BINARY_DIR}/kpimutils
${CMAKE_BINARY_DIR}/kpimtextedit
set(KF5_VERSION "4.97.0")
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KPIMIDENTITIES
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kpimidentities_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5PimIdentitiesConfigVersion.cmake"
SOVERSION 5
)
target_link_libraries(kpimidentities KF5::CoreAddons KF5::KIOCore KF5::SonnetCore kpimutils kpimtextedit )
generate_export_header(kpimidentities)
########### Find packages ###########
find_package(KF5 ${KF5_VERSION} CONFIG REQUIRED COMPONENTS CoreAddons KDE4Support KIO Sonnet)
find_package(KF5PimUtils ${KF5_VERSION} CONFIG REQUIRED)
########### Targets ###########
add_subdirectory(src)
#add_subdirectory(autotests)
target_link_libraries(kpimidentities kpimutils ${KDE4_KIO_LIBS} kpimtextedit)
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5PimIdentities")
set_target_properties(kpimidentities PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
install(TARGETS kpimidentities EXPORT kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
ecm_configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5PimIdentitiesConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5PimIdentitiesConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES org.kde.pim.IdentityManager.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
install(FILES
identity.h
signature.h
signatureconfigurator.h
identitymanager.h
identitycombo.h
${CMAKE_CURRENT_BINARY_DIR}/kpimidentities_export.h
DESTINATION ${INCLUDE_INSTALL_DIR}/kpimidentities COMPONENT Devel)
"${CMAKE_CURRENT_BINARY_DIR}/KF5PimIdentitiesConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5PimIdentitiesConfigVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(EXPORT KF5PimIdentitiesTargets
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
FILE KF5PimIdentitiesTargets.cmake
NAMESPACE KF5::
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kpimidentities_version.h
DESTINATION ${INCLUDE_INSTALL_DIR}
COMPONENT Devel
)
if ("${CMAKE_BINARY_DIR}" STREQUAL "${KPimIdentities_BINARY_DIR}")
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
endif()
@PACKAGE_INIT@
find_dependency(KF5CoreAddons "@KF5_VERSION@")
find_dependency(KF5KDE4Support "@KF5_VERSION@")
find_dependency(KF5KIO "@KF5_VERSION@")
find_dependency(KF5Sonnet "@KF5_VERSION@")
find_dependency(KF5PimUtils "@KF5_VERSION@")
include("${CMAKE_CURRENT_LIST_DIR}/KF5PimIdentitiesTargets.cmake")
set(kpimidentities_SRCS
identity.cpp
identitycombo.cpp
identitymanager.cpp
signature.cpp
signatureconfigurator.cpp
)
qt5_add_dbus_adaptor(kpimidentities_SRCS org.kde.pim.IdentityManager.xml identitymanager.h KPIMIdentities::IdentityManager )
add_library(KF5PimIdentities ${kpimidentities_SRCS})
generate_export_header(KF5PimIdentities BASE_NAME kpimidentities)
add_library(KF5::PimIdentities ALIAS KF5PimIdentities)
target_include_directories(KF5PimIdentities INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}/kpimidentities>")
target_include_directories(KF5PimIdentities PUBLIC "$<BUILD_INTERFACE:${KPimIdentities_SOURCE_DIR}/src;${KPimIdentities_BINARY_DIR}/src>")
target_link_libraries(KF5PimIdentities
KF5::CoreAddons
KF5::KDE4Support
KF5::KIOCore
KF5::PimUtils
KF5::SonnetCore
)
set_target_properties(KF5PimIdentities PROPERTIES
VERSION ${KPIMIDENTITIES_VERSION_STRING}
SOVERSION ${KPIMIDENTITIES_SOVERSION}
EXPORT_NAME PimIdentities
)
install(TARGETS KF5PimIdentities EXPORT KF5PimIdentitiesTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
########### Generate Headers ###############
ecm_generate_headers(KPimIdentities_CamelCase_HEADERS
HEADER_NAMES
Identity
IdentityCombo
IdentityManager
Signature
SignatureConfigurator
REQUIRED_HEADERS KPimIdentities_HEADERS
PREFIX KPIMIdentities
)
########### install files ###############
install(FILES
${KPimIdentities_CamelCase_HEADERS}
DESTINATION ${INCLUDE_INSTALL_DIR}/KPIMIdentities
COMPONENT Devel
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kpimidentities_export.h
${KPimIdentities_HEADERS}
DESTINATION ${INCLUDE_INSTALL_DIR}/kpimidentities
COMPONENT Devel
)
install(FILES org.kde.pim.IdentityManager.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
ecm_generate_pri_file(BASE_NAME KPimIdentities LIB_NAME KF5PimIdentities DEPS "CoreAddons KIO Sonnet" FILENAME_VAR PRI_FILENAME)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
......@@ -20,7 +20,7 @@
#ifndef KPIMIDENTITIES_IDENTITYMANAGER_H
#define KPIMIDENTITIES_IDENTITYMANAGER_H
#include <kpimidentities/kpimidentities_export.h>
#include <kpimidentities_export.h>
#include <kconfiggroup.h>
#include <QtCore/QObject>
......
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