Commit 490824b9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Autogenerate categories files

parent a6bd1f17
......@@ -126,7 +126,15 @@ add_subdirectory(noteshared)
add_subdirectory(src)
add_subdirectory(notesagent)
install(FILES knotes.categories knotes.renamecategories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
if (ECM_VERSION VERSION_LESS "5.68.0")
install(FILES knotes.categories knotes.renamecategories DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR})
else ()
ecm_qt_install_logging_categories(
EXPORT KNOTES
FILE knotes.categories
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
)
endif()
add_subdirectory(doc)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
......@@ -14,7 +14,15 @@ kconfig_add_kcfg_files(notesagent_SRCS
qt5_add_dbus_adaptor(notesagent_SRCS org.freedesktop.Akonadi.NotesAgent.xml notesagent.h NotesAgent)
ecm_qt_declare_logging_category(notesagent_SRCS HEADER notesagent_debug.h IDENTIFIER NOTESAGENT_LOG CATEGORY_NAME org.kde.pim.notesagentagent)
if (ECM_VERSION VERSION_LESS "5.68.0")
ecm_qt_declare_logging_category(notesagent_SRCS HEADER notesagent_debug.h IDENTIFIER NOTESAGENT_LOG CATEGORY_NAME org.kde.pim.notesagentagent)
else()
ecm_qt_declare_logging_category(notesagent_SRCS HEADER notesagent_debug.h IDENTIFIER NOTESAGENT_LOG CATEGORY_NAME org.kde.pim.notesagentagent
DESCRIPTION "knotes (note agent)"
OLD_CATEGORY_NAMES log_notesagentagent
EXPORT KNOTES
)
endif()
add_executable(akonadi_notes_agent ${notesagent_SRCS})
......
......@@ -29,7 +29,16 @@ set(libnoteshared_SRCS
${libnoteshared_akonadi_SRCS}
)
ecm_qt_declare_logging_category(libnoteshared_SRCS HEADER noteshared_debug.h IDENTIFIER NOTESHARED_LOG CATEGORY_NAME org.kde.pim.noteshared)
if (ECM_VERSION VERSION_LESS "5.68.0")
ecm_qt_declare_logging_category(libnoteshared_SRCS HEADER noteshared_debug.h IDENTIFIER NOTESHARED_LOG CATEGORY_NAME org.kde.pim.noteshared)
else()
ecm_qt_declare_logging_category(libnoteshared_SRCS HEADER noteshared_debug.h IDENTIFIER NOTESHARED_LOG CATEGORY_NAME org.kde.pim.noteshared
DESCRIPTION "knotes (noteshared)"
OLD_CATEGORY_NAMES log_noteshared
EXPORT KNOTES
)
endif()
macro(add_resource_iface _kcfgFile _ifaceName _className)
kcfg_generate_dbus_interface(${_kcfgFile} ${_ifaceName})
......
......@@ -46,7 +46,15 @@ configure_file(settings/knotesglobalconfig.kcfg.cmake ${CMAKE_CURRENT_BINARY_DIR
set( libknotesprivate_kcfg_lib_SRCS settings/knotesglobalconfig.kcfgc )
kconfig_add_kcfg_files(libknotesprivate_kcfg_lib_SRCS ${libknotesprivate_kcfg_lib_SRCS})
ecm_qt_declare_logging_category(libknotesprivate_lib_SRCS HEADER knotes_debug.h IDENTIFIER KNOTES_LOG CATEGORY_NAME org.kde.pim.knotes)
if (ECM_VERSION VERSION_LESS "5.68.0")
ecm_qt_declare_logging_category(libknotesprivate_lib_SRCS HEADER knotes_debug.h IDENTIFIER KNOTES_LOG CATEGORY_NAME org.kde.pim.knotes)
else()
ecm_qt_declare_logging_category(libknotesprivate_lib_SRCS HEADER knotes_debug.h IDENTIFIER KNOTES_LOG CATEGORY_NAME org.kde.pim.knotes
DESCRIPTION "knotes (knotes)"
OLD_CATEGORY_NAMES log_knotes
EXPORT KNOTES
)
endif()
add_library(knotesprivate ${libknotesprivate_lib_SRCS} ${libknotesprivate_kcfg_lib_SRCS} )
generate_export_header(knotesprivate BASE_NAME knotes)
......
......@@ -16,7 +16,16 @@ set(kontact_knotesplugin_PART_SRCS
qt5_add_dbus_adaptor(kontact_knotesplugin_PART_SRCS org.kde.kontact.KNotes.xml knotes_part.h KNotesPart)
qt5_add_dbus_interfaces(kontact_knotesplugin_interface_SRCS org.kde.kontact.KNotes.xml)
ecm_qt_declare_logging_category(kontact_knotesplugin_PART_SRCS HEADER knotes_kontact_plugin_debug.h IDENTIFIER KNOTES_KONTACT_PLUGIN_LOG CATEGORY_NAME org.kde.pim.knoteskontactplugin)
if (ECM_VERSION VERSION_LESS "5.68.0")
ecm_qt_declare_logging_category(kontact_knotesplugin_PART_SRCS HEADER knotes_kontact_plugin_debug.h IDENTIFIER KNOTES_KONTACT_PLUGIN_LOG CATEGORY_NAME org.kde.pim.knoteskontactplugin)
else()
ecm_qt_declare_logging_category(kontact_knotesplugin_PART_SRCS HEADER knotes_kontact_plugin_debug.h IDENTIFIER KNOTES_KONTACT_PLUGIN_LOG CATEGORY_NAME org.kde.pim.knoteskontactplugin
DESCRIPTION "knotes (knotes kontact plugin)"
OLD_CATEGORY_NAMES log_knoteskontactplugin
EXPORT KNOTES
)
endif()
add_library(kontact_knotesplugin MODULE ${kontact_knotesplugin_PART_SRCS} ${kontact_knotesplugin_interface_SRCS} )
......
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