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

GIT_SILENT: Use more target-centric cmake code

parent 9eb06cb0
Pipeline #63665 canceled with stage
......@@ -2,9 +2,9 @@
add_definitions(-DTRANSLATION_DOMAIN=\"cryptopageplugin\")
########### next target ###############
set(cryptopageplugin_SRCS cryptopageplugin.cpp )
add_library(cryptopageplugin MODULE)
target_sources(cryptopageplugin PRIVATE cryptopageplugin.cpp )
add_library(cryptopageplugin MODULE ${cryptopageplugin_SRCS})
target_link_libraries(cryptopageplugin KF5::Contacts KF5::ContactEditor KF5::Libkleo KF5::IconThemes KF5::I18n KF5::Completion Gpgmepp)
install(TARGETS cryptopageplugin DESTINATION ${KDE_INSTALL_LIBDIR}/contacteditor/editorpageplugins/)
set(pimcommon_googleshorturlengineplugin_SRCS
add_library(pimcommon_googleshorturlengineplugin MODULE)
target_sources(pimcommon_googleshorturlengineplugin PRIVATE
googleshorturlengineplugin.cpp
googleshorturlengineinterface.cpp
)
add_library(pimcommon_googleshorturlengineplugin MODULE ${pimcommon_googleshorturlengineplugin_SRCS})
target_link_libraries(pimcommon_googleshorturlengineplugin
KF5::PimCommon
......
########### next target ###############
add_library(korg_datenums MODULE)
set(korg_datenums_PART_SRCS
target_sources(korg_datenums PRIVATE
configdialog.cpp
datenums.cpp
)
add_library(korg_datenums MODULE ${korg_datenums_PART_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(korg_datenums PROPERTIES UNITY_BUILD ON)
endif()
......
########### next target ###############
find_package(KF5KDELibs4Support ${KF5_MIN_VERSION} CONFIG REQUIRED) #for the korganizer hebrew plugin
set(korg_hebrew_PART_SRCS
add_library(korg_hebrew MODULE)
target_sources(korg_hebrew PRIVATE
qcalendarsystem.cpp
configdialog.cpp
converter.cpp
......@@ -10,9 +11,8 @@ set(korg_hebrew_PART_SRCS
parsha.cpp
)
ecm_qt_declare_logging_category(korg_hebrew_PART_SRCS HEADER korganizer_hebrew_debug.h IDENTIFIER KORGANIZER_HEBREWPLUGIN_LOG CATEGORY_NAME org.kde.pim.korganizer_hebrew_plugin)
ecm_qt_declare_logging_category(korg_hebrew HEADER korganizer_hebrew_debug.h IDENTIFIER KORGANIZER_HEBREWPLUGIN_LOG CATEGORY_NAME org.kde.pim.korganizer_hebrew_plugin)
add_library(korg_hebrew MODULE ${korg_hebrew_PART_SRCS})
target_link_libraries(korg_hebrew
KF5::EventViews
......
########### next target ###############
set(korg_lunarphases_PART_SRCS
lunarphases.cpp
)
add_library(korg_lunarphases MODULE ${korg_lunarphases_PART_SRCS})
add_library(korg_lunarphases MODULE lunarphases.cpp)
target_link_libraries(korg_lunarphases
KF5::Holidays
......
########### next target ###############
add_library(korg_picoftheday MODULE)
set(korg_picoftheday_PART_SRCS
target_sources(korg_picoftheday PRIVATE
configdialog.cpp
picoftheday.cpp
)
ecm_qt_declare_logging_category(korg_picoftheday_PART_SRCS HEADER korganizer_picoftheday_plugin_debug.h IDENTIFIER KORGANIZERPICOFTHEDAYPLUGIN_LOG CATEGORY_NAME org.kde.pim.korganizer_picoftheday_plugins
ecm_qt_declare_logging_category(korg_picoftheday HEADER korganizer_picoftheday_plugin_debug.h IDENTIFIER KORGANIZERPICOFTHEDAYPLUGIN_LOG CATEGORY_NAME org.kde.pim.korganizer_picoftheday_plugins
DESCRIPTION "kdepim-addons (korganizer picoftheday plugins)"
OLD_CATEGORY_NAMES log_korganizer_picoftheday_plugins
EXPORT KDEPIMADDONS
)
add_library(korg_picoftheday MODULE ${korg_picoftheday_PART_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(korg_picoftheday PROPERTIES UNITY_BUILD ON)
endif()
......
add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_text_calendar_plugin\")
set(messageviewer_bodypartformatter_text_calendar_PART_SRCS
add_library(messageviewer_bodypartformatter_text_calendar MODULE ${messageviewer_bodypartformatter_text_calendar_PART_SRCS})
qt_add_dbus_interfaces(messageviewer_bodypartformatter_text_calendar_PART_SRCS
korganizer/org.kde.Korganizer.Calendar.xml
)
target_sources(messageviewer_bodypartformatter_text_calendar PRIVATE
text_calendar.cpp delegateselector.cpp attendeeselector.cpp memorycalendarmemento.cpp syncitiphandler.cpp
reactiontoinvitationdialog.cpp)
reactiontoinvitationdialog.cpp ${messageviewer_bodypartformatter_text_calendar_PART_SRCS})
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_text_calendar_PART_SRCS HEADER text_calendar_debug.h IDENTIFIER TEXT_CALENDAR_LOG CATEGORY_NAME org.kde.pim.text_calendar
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_text_calendar HEADER text_calendar_debug.h IDENTIFIER TEXT_CALENDAR_LOG CATEGORY_NAME org.kde.pim.text_calendar
DESCRIPTION "kdepim-addons (messageviewer calendar plugins)"
OLD_CATEGORY_NAMES log_text_calendar
EXPORT KDEPIMADDONS
)
qt_add_dbus_interfaces(messageviewer_bodypartformatter_text_calendar_PART_SRCS
korganizer/org.kde.Korganizer.Calendar.xml
)
ki18n_wrap_ui(messageviewer_bodypartformatter_text_calendar_PART_SRCS attendeeselector.ui)
ki18n_wrap_ui(messageviewer_bodypartformatter_text_calendar attendeeselector.ui)
add_library(messageviewer_bodypartformatter_text_calendar MODULE ${messageviewer_bodypartformatter_text_calendar_PART_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_text_calendar PROPERTIES UNITY_BUILD ON)
endif()
......
add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_application_gnupgwks_plugin\")
set(messageviewer_bodypartformatter_application_gnupgwks_SRCS
add_library(messageviewer_bodypartformatter_application_gnupgwks MODULE)
target_sources(messageviewer_bodypartformatter_application_gnupgwks PRIVATE
plugin.cpp
gnupgwksformatter.cpp
gnupgwksurlhandler.cpp
......@@ -12,7 +13,7 @@ set(messageviewer_bodypartformatter_application_gnupgwks_SRCS
templates.qrc
)
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_application_gnupgwks_SRCS
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_application_gnupgwks
HEADER gnupgwks_debug.h
IDENTIFIER GNUPGWKS_LOG
CATEGORY_NAME org.kde.pim.gnupgwks
......@@ -21,7 +22,6 @@ ecm_qt_declare_logging_category(messageviewer_bodypartformatter_application_gnup
)
add_library(messageviewer_bodypartformatter_application_gnupgwks MODULE ${messageviewer_bodypartformatter_application_gnupgwks_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_application_gnupgwks PROPERTIES UNITY_BUILD ON)
endif()
......
add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_text_xdiff_plugin\")
set(messageviewer_bodypartformatter_text_highlighter_PART_SRCS texthighlighterplugin.cpp highlighter.cpp)
add_library(messageviewer_bodypartformatter_text_highlighter MODULE )
target_sources(messageviewer_bodypartformatter_text_highlighter PRIVATE texthighlighterplugin.cpp highlighter.cpp)
add_library(messageviewer_bodypartformatter_text_highlighter MODULE ${messageviewer_bodypartformatter_text_highlighter_PART_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_text_highlighter PROPERTIES UNITY_BUILD ON)
endif()
......
set(itinerary_plugin_srcs
add_library(messageviewer_bodypartformatter_semantic MODULE)
target_sources(messageviewer_bodypartformatter_semantic PRIVATE
itinerary_plugin.cpp
itinerarymemento.cpp
itineraryprocessor.cpp
......@@ -7,13 +9,12 @@ set(itinerary_plugin_srcs
itinerarykdeconnecthandler.cpp
templates/templates.qrc
)
ecm_qt_declare_logging_category(itinerary_plugin_srcs HEADER itinerary_debug.h IDENTIFIER ITINERARY_LOG CATEGORY_NAME org.kde.pim.messageviewer.itinerary
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_semantic HEADER itinerary_debug.h IDENTIFIER ITINERARY_LOG CATEGORY_NAME org.kde.pim.messageviewer.itinerary
DESCRIPTION "kdepim-addons (Itinerary plugin)"
EXPORT KDEPIMADDONS
)
add_library(messageviewer_bodypartformatter_semantic MODULE ${itinerary_plugin_srcs})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_semantic PROPERTIES UNITY_BUILD ON)
endif()
......
set(mardown_engine_SRCS)
set(discount_LIB)
add_library(messageviewer_bodypartformatter_text_markdown MODULE)
if(USE_DISCOUNT_LIB)
add_definitions(-DUSE_DISCOUNT_LIB)
set(mardown_engine_SRCS markdowndiscount.cpp)
set(discount_LIB discount::Lib)
target_sources(messageviewer_bodypartformatter_text_markdown PRIVATE markdowndiscount.cpp)
target_link_libraries(messageviewer_bodypartformatter_text_markdown discount::Lib)
else()
set(mardown_engine_SRCS markdownqtextdocument.cpp)
set(messageviewer_bodypartformatter_text_markdown PRIVATE markdownqtextdocument.cpp)
endif()
add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_text_markdown_plugin\")
set(messageviewer_bodypartformatter_text_markdown_PART_SRCS textmarkdownplugin.cpp ${mardown_engine_SRCS} markdownabstract.cpp)
target_sources(messageviewer_bodypartformatter_text_markdown PRIVATE textmarkdownplugin.cpp markdownabstract.cpp)
add_library(messageviewer_bodypartformatter_text_markdown MODULE ${messageviewer_bodypartformatter_text_markdown_PART_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(messageviewer_bodypartformatter_text_markdown PROPERTIES UNITY_BUILD ON)
endif()
......@@ -20,7 +20,6 @@ target_link_libraries(messageviewer_bodypartformatter_text_markdown
Qt::Core
KF5::MessageViewer
Grantlee5::Templates
${discount_LIB}
)
install(TARGETS messageviewer_bodypartformatter_text_markdown DESTINATION ${KDE_INSTALL_PLUGINDIR}/messageviewer/bodypartformatter)
add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_application_mstnef_plugin\")
add_library(messageviewer_bodypartformatter_application_mstnef MODULE)
set(messageviewer_bodypartformatter_application_mstnef_SRCS application_ms-tnef.cpp)
target_sources(messageviewer_bodypartformatter_application_mstnef PRIVATE application_ms-tnef.cpp)
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_application_mstnef_SRCS HEADER ms_tnef_debug.h IDENTIFIER MS_TNEF_LOG CATEGORY_NAME org.kde.pim.ms_tnef
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_application_mstnef HEADER ms_tnef_debug.h IDENTIFIER MS_TNEF_LOG CATEGORY_NAME org.kde.pim.ms_tnef
DESCRIPTION "kdepim-addons (ms_tnef)"
OLD_CATEGORY_NAMES log_ms_tnef
EXPORT KDEPIMADDONS
)
add_library(messageviewer_bodypartformatter_application_mstnef MODULE ${messageviewer_bodypartformatter_application_mstnef_SRCS})
target_link_libraries(messageviewer_bodypartformatter_application_mstnef
Qt::Core
......
add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_bodypartformatter_pkpass\")
add_library(messageviewer_bodypartformatter_pkpass MODULE)
set(pkpass_srcs
target_sources(messageviewer_bodypartformatter_pkpass PRIVATE
pkpass_plugin.cpp
templates.qrc
)
ecm_qt_declare_logging_category(pkpass_srcs HEADER pkpass_debug.h IDENTIFIER PKPASS_LOG CATEGORY_NAME org.kde.pim.pkpass
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_pkpass HEADER pkpass_debug.h IDENTIFIER PKPASS_LOG CATEGORY_NAME org.kde.pim.pkpass
DESCRIPTION "kdepim-addons (pkpass formater)"
EXPORT KDEPIMADDONS
)
add_library(messageviewer_bodypartformatter_pkpass MODULE ${pkpass_srcs})
target_link_libraries(messageviewer_bodypartformatter_pkpass
KF5::Archive
KF5::Prison
......
add_definitions(-DTRANSLATION_DOMAIN=\"messageviewer_text_vcard_plugin\")
add_library(messageviewer_bodypartformatter_text_vcard MODULE)
set(messageviewer_bodypartformatter_text_vcard_PART_SRCS text_vcard.cpp vcardmemento.cpp updatecontactjob.cpp)
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_text_vcard_PART_SRCS HEADER vcard_debug.h IDENTIFIER VCARD_LOG CATEGORY_NAME org.kde.pim.vcard
target_sources(messageviewer_bodypartformatter_text_vcard PRIVATE text_vcard.cpp vcardmemento.cpp updatecontactjob.cpp)
ecm_qt_declare_logging_category(messageviewer_bodypartformatter_text_vcard HEADER vcard_debug.h IDENTIFIER VCARD_LOG CATEGORY_NAME org.kde.pim.vcard
DESCRIPTION "kdepim-addons (vcard)"
OLD_CATEGORY_NAMES log_vcard
EXPORT KDEPIMADDONS
)
add_library(messageviewer_bodypartformatter_text_vcard MODULE ${messageviewer_bodypartformatter_text_vcard_PART_SRCS})
target_link_libraries(messageviewer_bodypartformatter_text_vcard KF5::Contacts KF5::PimCommonAkonadi KF5::MessageViewer KF5::IconThemes KF5::JobWidgets KF5::I18n)
install(TARGETS messageviewer_bodypartformatter_text_vcard DESTINATION ${KDE_INSTALL_PLUGINDIR}/messageviewer/bodypartformatter)
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