Commit 8d8560be authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: Use more target-centric cmake code

parent b2039980
add_definitions(-DTRANSLATION_DOMAIN=\"libmessagecore\")
add_library(KF5MessageCore)
add_library(KF5::MessageCore ALIAS KF5MessageCore)
########### next target ###############
set(messagecore_autocrypt_LIB_SRCS
target_sources(KF5MessageCore PRIVATE
autocrypt/autocryptutils.cpp
autocrypt/autocryptrecipient.cpp
autocrypt/autocryptstorage.cpp
)
set(messagecore_attachment_LIB_SRCS
attachment/attachmentcompressjob.cpp
attachment/attachmentfromfolderjob.cpp
attachment/attachmentfrommimecontentjob.cpp
......@@ -18,60 +19,44 @@ set(messagecore_attachment_LIB_SRCS
attachment/attachmentpropertiesdialog.cpp
attachment/attachmentupdatejob.cpp
attachment/attachmentfromurlutils.cpp
)
set(messagecore_misc_LIB_SRCS
misc/imagecollector.cpp
misc/mailinglist.cpp
)
set(messagecore_helper_LIB_SRCS
helpers/nodehelper.cpp
)
set(messagecore_utils_LIB_SRCS
utils/stringutil.cpp
utils/util.cpp
utils/colorutil.cpp
)
set(messagecore_LIB_SRCS
${messagecore_autocrypt_LIB_SRCS}
${messagecore_attachment_LIB_SRCS}
${messagecore_misc_LIB_SRCS}
${messagecore_helper_LIB_SRCS}
${messagecore_utils_LIB_SRCS}
settings/messagecoresettings.cpp
)
kconfig_add_kcfg_files(messagecore_LIB_SRCS
kconfig_add_kcfg_files(KF5MessageCore
settings/globalsettings_messagecore.kcfgc
)
ki18n_wrap_ui(messagecore_LIB_SRCS
ki18n_wrap_ui(KF5MessageCore
attachment/ui/attachmentpropertiesdialog.ui
attachment/ui/attachmentpropertiesdialog_readonly.ui
)
ecm_qt_declare_logging_category(messagecore_LIB_SRCS HEADER messagecore_debug.h IDENTIFIER MESSAGECORE_LOG CATEGORY_NAME org.kde.pim.messagecore
ecm_qt_declare_logging_category(KF5MessageCore HEADER messagecore_debug.h IDENTIFIER MESSAGECORE_LOG CATEGORY_NAME org.kde.pim.messagecore
DESCRIPTION "messagelib (messagecore)"
OLD_CATEGORY_NAMES log_messagecore
EXPORT MESSAGELIB
)
ecm_qt_declare_logging_category(messagecore_LIB_SRCS HEADER autocrypt_debug.h IDENTIFIER AUTOCRYPT_LOG CATEGORY_NAME org.kde.pim.messagecore.autocrypt
ecm_qt_declare_logging_category(KF5MessageCore HEADER autocrypt_debug.h IDENTIFIER AUTOCRYPT_LOG CATEGORY_NAME org.kde.pim.messagecore.autocrypt
DESCRIPTION "messagelib (messagecore.autocrypt)"
EXPORT MESSAGELIB
)
add_library(KF5MessageCore ${messagecore_LIB_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5MessageCore PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5MessageCore BASE_NAME messagecore)
add_library(KF5::MessageCore ALIAS KF5MessageCore)
target_link_libraries(KF5MessageCore
PUBLIC
......
......@@ -2,6 +2,8 @@
option(KDEPIM_FOLDEROPEN_PROFILE "Enable debug output for timing folder loading" FALSE)
configure_file(config-messagelist.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-messagelist.h)
add_library(KF5MessageList)
add_library(KF5::MessageList ALIAS KF5MessageList)
add_definitions(-DTRANSLATION_DOMAIN=\"libmessagelist\")
......@@ -9,7 +11,7 @@ add_subdirectory(pics)
if(BUILD_TESTING)
add_subdirectory(core/widgets/autotests)
endif()
set(libmessagelist_SRCS
target_sources(KF5MessageList PRIVATE
core/aggregation.cpp
core/delegate.cpp
core/filter.cpp
......@@ -57,23 +59,21 @@ set(libmessagelist_SRCS
widget.cpp
messagelistutil.cpp
)
ecm_qt_declare_logging_category(libmessagelist_SRCS HEADER messagelist_debug.h IDENTIFIER MESSAGELIST_LOG CATEGORY_NAME org.kde.pim.messagelist
ecm_qt_declare_logging_category(KF5MessageList HEADER messagelist_debug.h IDENTIFIER MESSAGELIST_LOG CATEGORY_NAME org.kde.pim.messagelist
DESCRIPTION "messagelib (messagelist)"
OLD_CATEGORY_NAMES log_messagelist
EXPORT MESSAGELIB
)
kconfig_add_kcfg_files(libmessagelist_SRCS
kconfig_add_kcfg_files(KF5MessageList
core/messagelistsettings.kcfgc
)
add_library(KF5MessageList ${libmessagelist_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5MessageList PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5MessageList BASE_NAME messagelist)
add_library(KF5::MessageList ALIAS KF5MessageList)
target_include_directories(KF5MessageList INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MessageList/;${KDE_INSTALL_INCLUDEDIR_KF5}/messagelist>")
......
......@@ -4,7 +4,10 @@ add_definitions(-DTRANSLATION_DOMAIN=\"libmimetreeparser\")
# target_include_directories does not handle empty include paths
include_directories(${GPGME_INCLUDES})
set(libmimetreeparser_main_SRCS
add_library(KF5MimeTreeParser)
add_library(KF5::MimeTreeParser ALIAS KF5MimeTreeParser)
target_sources(KF5MimeTreeParser PRIVATE
bodyformatter/applicationpgpencrypted.cpp
bodyformatter/applicationpkcs7mime.cpp
bodyformatter/encrypted.cpp
......@@ -33,9 +36,7 @@ set(libmimetreeparser_main_SRCS
memento/decryptverifybodypartmemento.cpp
memento/verifydetachedbodypartmemento.cpp
memento/verifyopaquebodypartmemento.cpp
)
set(mimetreeparser_temporaryfile_SRCS
temporaryfile/attachmenttemporaryfilesdirs.cpp
)
......@@ -110,26 +111,20 @@ set(libmimetreeparser_SRCS
${mimetreeparser_temporaryfile_SRCS}
)
ecm_qt_declare_logging_category(libmimetreeparser_SRCS HEADER mimetreeparser_debug.h IDENTIFIER MIMETREEPARSER_LOG CATEGORY_NAME org.kde.pim.mimetreeparser
ecm_qt_declare_logging_category(KF5MimeTreeParser HEADER mimetreeparser_debug.h IDENTIFIER MIMETREEPARSER_LOG CATEGORY_NAME org.kde.pim.mimetreeparser
DESCRIPTION "messagelib (mimetreeparser)"
OLD_CATEGORY_NAMES log_mimetreeparser
EXPORT MESSAGELIB
)
add_library(KF5MimeTreeParser
${libmimetreeparser_SRCS}
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5MimeTreeParser PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5MimeTreeParser BASE_NAME mimetreeparser)
add_library(KF5::MimeTreeParser ALIAS KF5MimeTreeParser)
set(mimetreeparser_LINK_LIBRARIES
)
target_link_libraries(KF5MimeTreeParser
PRIVATE
......
add_definitions(-DTRANSLATION_DOMAIN=\"libtemplateparser\")
add_library(KF5TemplateParser)
add_library(KF5::TemplateParser ALIAS KF5TemplateParser)
set(templateparser_LIB_SRCS
target_sources(KF5TemplateParser PRIVATE
templateparserjob.cpp
defaulttemplates.cpp
templatesutil.cpp
......@@ -24,7 +26,7 @@ set(templateparser_LIB_SRCS
templateparseremailaddressrequesterinterfacewidget.cpp
templateconvertcommandjob.cpp
)
ecm_qt_declare_logging_category(templateparser_LIB_SRCS HEADER templateparser_debug.h IDENTIFIER TEMPLATEPARSER_LOG CATEGORY_NAME org.kde.pim.templateparser
ecm_qt_declare_logging_category(KF5TemplateParser HEADER templateparser_debug.h IDENTIFIER TEMPLATEPARSER_LOG CATEGORY_NAME org.kde.pim.templateparser
DESCRIPTION "messagelib (templateparser)"
OLD_CATEGORY_NAMES log_templateparser
EXPORT MESSAGELIB
......@@ -32,25 +34,23 @@ ecm_qt_declare_logging_category(templateparser_LIB_SRCS HEADER templateparser_de
kconfig_add_kcfg_files(templateparser_LIB_SRCS settings/templatesconfiguration_kfg.kcfgc)
kconfig_add_kcfg_files(KF5TemplateParser settings/templatesconfiguration_kfg.kcfgc)
kconfig_add_kcfg_files(templateparser_LIB_SRCS
kconfig_add_kcfg_files(KF5TemplateParser
settings/customtemplates_kfg.kcfgc
settings/globalsettings_templateparser.kcfgc
)
ki18n_wrap_ui(templateparser_LIB_SRCS
ki18n_wrap_ui(KF5TemplateParser
ui/templatesconfiguration_base.ui
ui/customtemplates_base.ui
)
add_library(KF5TemplateParser ${templateparser_LIB_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5TemplateParser PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5TemplateParser BASE_NAME templateparser)
add_library(KF5::TemplateParser ALIAS KF5TemplateParser)
target_link_libraries(KF5TemplateParser
PRIVATE
......
add_definitions(-DTRANSLATION_DOMAIN=\"libwebengineviewer\")
include_directories(${CMAKE_BINARY_DIR}/webengineviewer/src ${CMAKE_BINARY_DIR}/webengineviewer)
add_library(KF5WebEngineViewer)
add_library(KF5::WebEngineViewer ALIAS KF5WebEngineViewer)
if(BUILD_TESTING)
add_subdirectory(tests)
......@@ -16,7 +19,7 @@ endif()
set(libwebengineviewer_webengine_SRCS
target_sources(KF5WebEngineViewer PRIVATE
networkmanager/interceptormanager.cpp
webhittestresult.cpp
webhittest.cpp
......@@ -27,10 +30,8 @@ set(libwebengineviewer_webengine_SRCS
webengineexporthtmlpagejob.cpp
webenginenavigationrequestinterceptor.cpp
webengineexportpdfpagejob.cpp
)
set(libwebengineviewer_checkphishingurl_SRCS
checkphishingurl/checkphishingurljob.cpp
checkphishingurl/checkphishingurljob.cpp
checkphishingurl/checkphishingurlcache.cpp
checkphishingurl/createphishingurldatabasejob.cpp
checkphishingurl/localdatabasemanager.cpp
......@@ -44,10 +45,8 @@ set(libwebengineviewer_checkphishingurl_SRCS
checkphishingurl/hashcachemanager.cpp
checkphishingurl/backoffmodemanager.cpp
checkphishingurl/downloadlocaldatabasethread.cpp
)
set(libwebengineviewer_interceptor_SRCS
urlinterceptor/networkurlinterceptor.cpp
urlinterceptor/networkurlinterceptor.cpp
urlinterceptor/networkpluginurlinterceptorinterface.cpp
urlinterceptor/networkurlinterceptorpluginmanager.cpp
urlinterceptor/networkpluginurlinterceptor.cpp
......@@ -56,64 +55,35 @@ set(libwebengineviewer_interceptor_SRCS
urlinterceptor/blocktrackingurlinterceptor/blocktrackingurlinterceptor.cpp
urlinterceptor/loadexternalreferencesurlinterceptor/loadexternalreferencesurlinterceptor.cpp
urlinterceptor/blockexternalresourcesurlinterceptor/blockexternalresourcesurlinterceptor.cpp
)
set(libwebengineviewer_accesskey_SRCS
webengineaccesskey/webengineaccesskey.cpp
webengineaccesskey/webengineaccesskeyanchor.cpp
webengineaccesskey/webengineaccesskeyutils.cpp
)
set(libwebengineviewer_findbar_SRCS
findbar/findbarbase.cpp
findbar/findbarwebengineview.cpp
)
set(libwebengineviewer_widgets_SRCS
widgets/zoomactionmenu.cpp
)
set(libwebengineviewer_tracking_SRCS
widgets/tracking/trackingdetailsdialog.cpp
widgets/tracking/trackingdetailsdialog.cpp
widgets/tracking/trackingwarningwidget.cpp
)
set(libwebengineviewer_developertool_SRCS
developertool/developertoolwidget.cpp
developertool/developertoolwidget.cpp
developertool/developertooldialog.cpp
)
set(libwebengineviewer_submittedform_SRCS
widgets/submittedformwidgets/submittedformwarningwidget.cpp
)
set(libwebengineviewer_SRCS
${libwebengineviewer_submittedform_SRCS}
${libwebengineviewer_developertool_SRCS}
${libwebengineviewer_checkphishingurl_SRCS}
${libwebengineviewer_interceptor_SRCS}
${libwebengineviewer_webengine_SRCS}
${libwebengineviewer_findbar_SRCS}
${libwebengineviewer_widgets_SRCS}
${libwebengineviewer_print_SRCS}
${libwebengineviewer_accesskey_SRCS}
${libwebengineviewer_tracking_SRCS}
)
ecm_qt_declare_logging_category(libwebengineviewer_webengine_SRCS HEADER webengineviewer_debug.h IDENTIFIER WEBENGINEVIEWER_LOG CATEGORY_NAME org.kde.pim.webengineviewer
ecm_qt_declare_logging_category(KF5WebEngineViewer HEADER webengineviewer_debug.h IDENTIFIER WEBENGINEVIEWER_LOG CATEGORY_NAME org.kde.pim.webengineviewer
DESCRIPTION "messagelib (webengineviewer)"
EXPORT MESSAGELIB
)
add_library(KF5WebEngineViewer ${libwebengineviewer_SRCS} ${libwebengineviewer_webengine_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(KF5WebEngineViewer PROPERTIES UNITY_BUILD ON)
endif()
generate_export_header(KF5WebEngineViewer BASE_NAME webengineviewer)
add_library(KF5::WebEngineViewer ALIAS KF5WebEngineViewer)
target_include_directories(KF5WebEngineViewer INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/WebEngineViewer/;${KDE_INSTALL_INCLUDEDIR_KF5}/webengineviewer>")
......
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