Commit 3e85a21c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use more centric cmake code

parent c3f261f7
Pipeline #66427 failed with stage
in 25 minutes and 22 seconds
......@@ -48,19 +48,19 @@ install(TARGETS akonadi_akonotes_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
############################### Config plugin #################################
set(akonotesconfig_SRCS
../maildir/configwidget.cpp
../maildir/maildirconfig.cpp
akonotesconfig.cpp
${akonotes_common_SRCS}
)
ki18n_wrap_ui(akonotesconfig_SRCS ../maildir/settings.ui)
kcoreaddons_add_plugin(akonotesconfig
SOURCES ${akonotesconfig_SRCS}
JSON "akonotesconfig.json"
INSTALL_NAMESPACE akonadi/config
)
ki18n_wrap_ui(akonotesconfig ../maildir/settings.ui)
target_sources(akonotesconfig PRIVATE
../maildir/configwidget.cpp
../maildir/maildirconfig.cpp
akonotesconfig.cpp
${akonotes_common_SRCS}
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonotesconfig PROPERTIES UNITY_BUILD ON)
endif()
......
......@@ -51,20 +51,16 @@ install( FILES birthdaysresource.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}
############################# Config plugin ################################
set(birthdaysconfig_ui_SRCS)
ki18n_wrap_ui(birthdaysconfig_ui_SRCS birthdaysconfigwidget.ui)
set(birthdaysconfig_SRCS
birthdaysconfigagentwidget.cpp
${birthdaysconfig_ui_SRCS}
${birthdayresource_common_SRCS}
)
kcoreaddons_add_plugin(birthdaysconfig
SOURCES ${birthdaysconfig_SRCS}
JSON "birthdaysconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
ki18n_wrap_ui(birthdaysconfig birthdaysconfigwidget.ui)
target_sources(birthdaysconfig PRIVATE
birthdaysconfigagentwidget.cpp
${birthdayresource_common_SRCS}
)
target_link_libraries(birthdaysconfig
KF5::AkonadiCore
KF5::CalendarCore
......
......@@ -47,21 +47,18 @@ target_link_libraries(akonadi_contacts_resource
install(TARGETS akonadi_contacts_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
############################## Config plugin ################################
set(contactsconfig_ui_SRCS)
ki18n_wrap_ui(contactsconfig_ui_SRCS contactsagentsettingswidget.ui)
kcoreaddons_add_plugin(contactsconfig
JSON "contactsconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
ki18n_wrap_ui(contactsconfig contactsagentsettingswidget.ui)
set(contactsconfig_SRCS
target_sources(contactsconfig PRIVATE
contactssettingswidget.cpp
${contactsconfig_ui_SRCS}
${contactsresource_common_SRCS}
)
kcoreaddons_add_plugin(contactsconfig
SOURCES ${contactsconfig_SRCS}
JSON "contactsconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
target_link_libraries(contactsconfig
KF5::AkonadiCore
KF5::CalendarCore
......
......@@ -53,10 +53,10 @@ install(TARGETS akonadi_ical_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
################################ Config plugin ###############################
kcoreaddons_add_plugin(icalconfig
SOURCES icalconfig.cpp ${icalresource_common_SRCS}
JSON "icalconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
target_sources(icalconfig PRIVATE icalconfig.cpp ${icalresource_common_SRCS})
target_link_libraries(icalconfig
KF5::AkonadiCore
akonadi-singlefileresource
......
......@@ -46,21 +46,18 @@ target_link_libraries(akonadi_icaldir_resource
install(TARGETS akonadi_icaldir_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
############################## Config plugin ################################
set(icaldirconfig_ui_SRCS)
ki18n_wrap_ui(icaldirconfig_ui_SRCS icaldirsagentsettingswidget.ui)
kcoreaddons_add_plugin(icaldirconfig
JSON "icaldirconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
ki18n_wrap_ui(icaldirconfig icaldirsagentsettingswidget.ui)
set(icaldirconfig_SRCS
target_sources(icaldirconfig PRIVATE
icaldirsettingswidget.cpp
${icaldirconfig_ui_SRCS}
${icaldirresource_common_SRCS}
)
kcoreaddons_add_plugin(icaldirconfig
SOURCES ${icaldirconfig_SRCS}
JSON "icaldirconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
target_link_libraries(icaldirconfig
KF5::AkonadiCore
KF5::CalendarCore
......
......@@ -64,18 +64,17 @@ install(TARGETS akonadi_kalarm_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
############################## Config plugin #################################
kcoreaddons_add_plugin(kalarmconfig
JSON "kalarmconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
set(kalarmconfig_SRCS
target_sources(kalarmconfig PRIVATE
kalarmconfig.cpp
../shared/alarmtyperadiowidget.cpp
${kalarmresource_common_SRCS}
)
kcoreaddons_add_plugin(kalarmconfig
SOURCES ${kalarmconfig_SRCS}
JSON "kalarmconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
target_link_libraries(kalarmconfig
KF5::AkonadiCore
......
......@@ -60,22 +60,21 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.Akonadi.Maildir.Settings.xml
install( FILES maildirresource.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents" )
############################# Config plugin ###############################
kcoreaddons_add_plugin(maildirconfig
JSON "maildirconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
set(maildirconfig_SRCS
target_sources(maildirconfig PRIVATE
maildirconfigmain.cpp
maildirconfig.cpp
configwidget.cpp
${maildir_common_SRCS}
)
ki18n_wrap_ui(maildirconfig_SRCS settings.ui)
ki18n_wrap_ui(maildirconfig settings.ui)
kcoreaddons_add_plugin(maildirconfig
SOURCES ${maildirconfig_SRCS}
JSON "maildirconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
target_link_libraries(maildirconfig
KF5::AkonadiCore
KF5::ConfigWidgets
......
......@@ -71,24 +71,23 @@ if (BUILD_TESTING)
endif()
############################# Config plugin ################################
kcoreaddons_add_plugin(mboxconfig
JSON "mboxconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
set(mboxconfig_SRCS
target_sources(mboxconfig PRIVATE
mboxconfig.cpp
lockmethodpage.cpp
compactpage.cpp
${mboxresource_common_SRCS}
)
ki18n_wrap_ui(mboxconfig_SRCS
ki18n_wrap_ui(mboxconfig
compactpage.ui
lockfilepage.ui
)
kcoreaddons_add_plugin(mboxconfig
SOURCES ${mboxconfig_SRCS}
JSON "mboxconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
target_link_libraries(mboxconfig
KF5::AkonadiCore
KF5::ConfigWidgets
......
......@@ -66,19 +66,18 @@ install(FILES akonadi_pop3_resource.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5R
################################## Config plugin ##############################
kcoreaddons_add_plugin(pop3config
JSON "pop3config.json"
INSTALL_NAMESPACE "akonadi/config"
)
set(pop3config_SRCS
target_sources(pop3config PRIVATE
pop3config.cpp
accountwidget.cpp
${pop3_common_SRCS}
)
ki18n_wrap_ui(pop3config_SRCS popsettings.ui)
ki18n_wrap_ui(pop3config popsettings.ui)
kcoreaddons_add_plugin(pop3config
SOURCES ${pop3config_SRCS}
JSON "pop3config.json"
INSTALL_NAMESPACE "akonadi/config"
)
target_link_libraries(pop3config
KF5::AkonadiCore
KF5::TextWidgets
......
add_definitions(-DTRANSLATION_DOMAIN=\"akonadi-filestore\")
add_library(akonadi-filestore)
set(akonadi-filestore_SRCS
target_sources(akonadi-filestore PRIVATE
abstractlocalstore.cpp
collectioncreatejob.cpp
collectiondeletejob.cpp
......@@ -20,13 +21,12 @@ set(akonadi-filestore_SRCS
storecompactjob.cpp
)
ecm_qt_declare_logging_category(akonadi-filestore_SRCS HEADER akonadifilestore_debug.h IDENTIFIER AKONADIFILESTORE_LOG CATEGORY_NAME org.kde.pim.filestore
ecm_qt_declare_logging_category(akonadi-filestore HEADER akonadifilestore_debug.h IDENTIFIER AKONADIFILESTORE_LOG CATEGORY_NAME org.kde.pim.filestore
DESCRIPTION "resource filestore lib (kdepim-runtime)"
EXPORT KDEPIMRUNTIME
)
add_library(akonadi-filestore ${akonadi-filestore_SRCS} )
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadi-filestore PROPERTIES UNITY_BUILD ON)
endif()
......
......@@ -88,20 +88,17 @@ install(FILES tomboynotesresource.desktop
)
############################# Config plugin ################################
set(tomboynotesconfig_ui_SRCS)
ki18n_wrap_ui(tomboynotesconfig_ui_SRCS tomboynotesagentconfigwidget.ui)
set(tomboynotesconfig_SRCS
kcoreaddons_add_plugin(tomboynotesconfig
JSON "tomboynotesconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
ki18n_wrap_ui(tomboynotesconfig tomboynotesagentconfigwidget.ui)
target_sources(tomboynotesconfig PRIVATE
tomboynotesconfigwidget.cpp
${tomboynotesconfig_ui_SRCS}
${tomboynotesresource_common_SRCS}
)
kcoreaddons_add_plugin(tomboynotesconfig
SOURCES ${tomboynotesconfig_SRCS}
JSON "tomboynotesconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
target_link_libraries(tomboynotesconfig
KF5::AkonadiCore
KF5::CalendarCore
......
......@@ -54,21 +54,19 @@ add_subdirectory(wizard)
install(TARGETS akonadi_vcarddir_resource ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
############################## Config plugin ################################
set(vcarddirconfig_ui_SRCS)
ki18n_wrap_ui(vcarddirconfig_ui_SRCS vcarddiragentsettingswidget.ui)
kcoreaddons_add_plugin(vcarddirconfig
JSON "vcarddirconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
ki18n_wrap_ui(vcarddirconfig vcarddiragentsettingswidget.ui)
set(vcarddirconfig_SRCS
target_sources(vcarddirconfig PRIVATE
vcarddirsettingswidget.cpp
${vcarddirconfig_ui_SRCS}
${vcarddirresource_common_SRCS}
)
kcoreaddons_add_plugin(vcarddirconfig
SOURCES ${vcarddirconfig_SRCS}
JSON "vcarddirconfig.json"
INSTALL_NAMESPACE "akonadi/config"
)
target_link_libraries(vcarddirconfig
KF5::AkonadiCore
KF5::CalendarCore
......
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