CMakeLists.txt 3.02 KB
Newer Older
1
2
3
4
5
6
ecm_setup_version(PROJECT
    VARIABLE_PREFIX IMPORTWIZARD
    VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/importwizard_version.h"
    PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KPimImportWizardConfigVersion.cmake"
    SOVERSION 5
)
Laurent Montel's avatar
Laurent Montel committed
7

Laurent Montel's avatar
Laurent Montel committed
8
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KPimImportWizard")
Laurent Montel's avatar
Laurent Montel committed
9
10
11
12
13
14
15
16
17
18


configure_package_config_file(
    "${CMAKE_CURRENT_SOURCE_DIR}/KPimImportWizardConfig.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/KPimImportWizardConfig.cmake"
    INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)

install(FILES
    "${CMAKE_CURRENT_BINARY_DIR}/KPimImportWizardConfig.cmake"
19
    "${CMAKE_CURRENT_BINARY_DIR}/KPimImportWizardConfigVersion.cmake"
Laurent Montel's avatar
Laurent Montel committed
20
21
22
23
24
25
26
27
28
29
30
31
    DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
    COMPONENT Devel
)

install(EXPORT KPimImportWizardTargets
    DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
    FILE KPimImportWizardTargets.cmake
    NAMESPACE KPim::
)

install(FILES
    "${CMAKE_CURRENT_BINARY_DIR}/importwizard_version.h"
Laurent Montel's avatar
Laurent Montel committed
32
    DESTINATION "${KDE_INSTALL_INCLUDEDIR}/KPim/"
Laurent Montel's avatar
Laurent Montel committed
33
34
35
36
37
    COMPONENT Devel
)



Laurent Montel's avatar
Laurent Montel committed
38
39
40
41
42
43
44
45
46
47
48
49
set(libimportwizard_abstract_SRCS
    abstractimporter.cpp
    abstractsettings.cpp
    abstractaddressbook.cpp
    abstractcalendar.cpp
    abstractbase.cpp
    abstractdisplayinfo.cpp
    )
set(libimportwizard_utils_SRCS
    importwizardutil.cpp
    )

50
ecm_qt_declare_logging_category(libimportwizard_abstract_SRCS HEADER libimportwizard_debug.h IDENTIFIER LIBIMPORTWIZARD_LOG CATEGORY_NAME org.kde.pim.importwizard.lib
Laurent Montel's avatar
Laurent Montel committed
51
52
53
54
55
        DESCRIPTION "importwizard (libimportwizard)"
        EXPORT IMPORTWIZARD
    )


Laurent Montel's avatar
Laurent Montel committed
56

Laurent Montel's avatar
Laurent Montel committed
57
add_library(KPimImportWizard ${libimportwizard_abstract_SRCS} ${libimportwizard_utils_SRCS})
Laurent Montel's avatar
Laurent Montel committed
58

Laurent Montel's avatar
Laurent Montel committed
59
add_library(KPim::ImportWizard ALIAS KPimImportWizard)
Laurent Montel's avatar
Laurent Montel committed
60

Laurent Montel's avatar
Laurent Montel committed
61

Laurent Montel's avatar
Laurent Montel committed
62
63
64
target_include_directories(KPimImportWizard INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KPim/ImportWizard;${KDE_INSTALL_INCLUDEDIR_KF5}/KPim/>")


Laurent Montel's avatar
Laurent Montel committed
65
66
67
generate_export_header(KPimImportWizard BASE_NAME libimportwizard)

target_link_libraries(KPimImportWizard
Laurent Montel's avatar
Laurent Montel committed
68
69
70
71
72
73
    PUBLIC
    KF5::MailTransport
    PRIVATE
    KF5::Archive
    KF5::PimCommon
    KF5::MailCommon
Laurent Montel's avatar
Laurent Montel committed
74
    KF5::MailImporter
Laurent Montel's avatar
Laurent Montel committed
75
76
77
    KF5::I18n
    )

Laurent Montel's avatar
Laurent Montel committed
78
79
80
81
82
83
84
85
86
87
88
89
set_target_properties(KPimImportWizard PROPERTIES
    VERSION ${IMPORTWIZARD_VERSION_STRING}
    SOVERSION ${IMPORTWIZARD_SOVERSION}
    EXPORT_NAME ImportWizard
)

install(TARGETS
    KPimImportWizard
    EXPORT KPimImportWizardTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}
)


90
install(TARGETS KPimImportWizard ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
Laurent Montel's avatar
Laurent Montel committed
91
92
93
94
95
96
97
98
99

ecm_generate_headers(ImportWizard_CamelCase_HEADERS
    HEADER_NAMES
    AbstractBase
    AbstractDisplayInfo
    AbstractImporter
    AbstractSettings
    AbstractAddressBook
    AbstractCalendar
Laurent Montel's avatar
Laurent Montel committed
100
    ImportWizardUtil
Laurent Montel's avatar
Laurent Montel committed
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    PREFIX ImportWizard
    REQUIRED_HEADERS ImportWizard_HEADERS
    )

install(FILES
    ${ImportWizard_CamelCase_HEADERS}
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KPim/ImportWizard/
    COMPONENT Devel
    )

install(FILES
    ${CMAKE_CURRENT_BINARY_DIR}/libimportwizard_export.h
    ${ImportWizard_HEADERS}
    DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/KPim/importwizard/
    COMPONENT Devel
    )