Commit 27e1bf4c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use more target-centric cmake code

parent fe70972d
Pipeline #62871 passed with stage
in 9 minutes and 28 seconds
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5MailImporter")
add_library(KF5MailImporter)
add_library(KF5::MailImporter ALIAS KF5MailImporter)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5MailImporterConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailImporterConfig.cmake"
......@@ -28,7 +31,7 @@ install(FILES
)
set(libmailimporter_filters_SRCS
target_sources(KF5MailImporter PRIVATE
filters/filteroe.cpp
filters/filterpmail.cpp
filters/filterplain.cpp
......@@ -49,9 +52,6 @@ set(libmailimporter_filters_SRCS
filters/filtericedove.cpp
filters/filterbalsa.cpp
filters/filterseamonkey.cpp
)
set(libmailimporter_SRCS
messagestatus.cpp
importmailswidget.cpp
filterinfogui.cpp
......@@ -63,25 +63,19 @@ set(libmailimporter_SRCS
)
ki18n_wrap_ui(libmailimporter_SRCS ui/importmailswidget.ui ui/selectthunderbirdprofilewidget.ui)
ki18n_wrap_ui(KF5MailImporter ui/importmailswidget.ui ui/selectthunderbirdprofilewidget.ui)
ecm_qt_declare_logging_category(libmailimporter_SRCS HEADER mailimporter_debug.h IDENTIFIER MAILIMPORTER_LOG CATEGORY_NAME org.kde.pim.mailimporter
ecm_qt_declare_logging_category(KF5MailImporter HEADER mailimporter_debug.h IDENTIFIER MAILIMPORTER_LOG CATEGORY_NAME org.kde.pim.mailimporter
DESCRIPTION "mailimporter (mailimporter)"
OLD_CATEGORY_NAMES log_mailimporter
EXPORT MAILIMPORTER
)
add_library(KF5MailImporter
${libmailimporter_SRCS}
${libmailimporter_filters_SRCS}
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5MailImporter PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header( KF5MailImporter BASE_NAME mailimporter)
add_library(KF5::MailImporter ALIAS KF5MailImporter)
target_include_directories(KF5MailImporter INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MailImporter/;${KDE_INSTALL_INCLUDEDIR_KF5}/mailimporter>")
target_include_directories(KF5MailImporter PUBLIC "$<BUILD_INTERFACE:${MailImporter_SOURCE_DIR}/src;${MailImporter_BINARY_DIR}/src;>")
......
########### CMake Config Files ###########
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5MailImporterAkonadi")
add_library(KF5MailImporterAkonadi)
add_library(KF5::MailImporterAkonadi ALIAS KF5MailImporterAkonadi)
configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5MailImporterAkonadiConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5MailImporterAkonadiConfig.cmake"
......@@ -27,7 +28,7 @@ install(FILES
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5} COMPONENT Devel
)
set(libmailimporterakonadi_SRCS
set(KF5MailImporterAkonadi PRIVATE
filterimporterakonadi.cpp
)
......@@ -38,9 +39,6 @@ ecm_qt_declare_logging_category(libmailimporterakonadi_SRCS HEADER mailimportera
add_library(KF5MailImporterAkonadi
${libmailimporterakonadi_SRCS}
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5MailImporterAkonadi PROPERTIES UNITY_BUILD ON)
endif()
......
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