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

REplace akonadi_generate_headers_with_deprecated by ecm_generate_headers now

parent 84f4ad38
Pipeline #82969 passed with stage
in 13 minutes and 41 seconds
......@@ -86,35 +86,3 @@ function(akonadi_add_xmllint_test)
add_test(${TEST_UNPARSED_ARGUMENTS} ${XMLLINT_EXECUTABLE} --noout --schema ${xsd_relpath} ${xml_relpath})
endfunction()
function(akonadi_generate_headers_with_deprecated camelcase_forwarding_headers_var)
# extend as needed to support those ecm_generate_headers arguments akonadi cmake code does use
set(options)
set(oneValueArgs PREFIX REQUIRED_HEADERS DEPRECATED_DESTINATION RELATIVE)
set(multiValueArgs HEADER_NAMES)
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (ARG_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unexpected argument to akonadi_generate_headers: ${ARG_UNPARSED_ARGUMENTS}")
endif()
if (NOT ARG_DEPRECATED_DESTINATION)
message(FATAL_ERROR "DEPRECATED_DESTINATION argument is required with akonadi_generate_headers")
endif()
# forward for normal macro
set(ecmOneValueArgL)
foreach(ecmOneValueArg PREFIX REQUIRED_HEADERS RELATIVE)
if (ARG_${ecmOneValueArg} )
list(APPEND ecmOneValueArgL ${ecmOneValueArg} ${ARG_${ecmOneValueArg}})
endif()
endforeach()
ecm_generate_headers(${camelcase_forwarding_headers_var}
${ecmOneValueArgL}
HEADER_NAMES ${ARG_HEADER_NAMES}
)
set(${camelcase_forwarding_headers_var} ${${camelcase_forwarding_headers_var}} PARENT_SCOPE)
if (ARG_REQUIRED_HEADERS)
set(${ARG_REQUIRED_HEADERS} ${${ARG_REQUIRED_HEADERS}} PARENT_SCOPE)
endif ()
endfunction()
......@@ -10,7 +10,7 @@ ecm_qt_declare_logging_category(KF5AkonadiAgentBase HEADER akonadiagentbase_debu
EXPORT AKONADI
)
akonadi_generate_headers_with_deprecated(AkonadiAgentBase_CC_HEADERS
ecm_generate_headers(AkonadiAgentBase_CC_HEADERS
HEADER_NAMES
AccountsIntegration
AgentBase
......@@ -21,7 +21,6 @@ akonadi_generate_headers_with_deprecated(AkonadiAgentBase_CC_HEADERS
TransportResourceBase
REQUIRED_HEADERS AkonadiAgentBase_HEADERS
PREFIX Akonadi
DEPRECATED_DESTINATION ${AkonadiAgentBase_INSTALL_INCLUDEDIR}
)
......
......@@ -74,7 +74,7 @@ set(akonadicore_base_SRCS
typepluginloader.cpp
)
akonadi_generate_headers_with_deprecated(AkonadiCore_base_CC_HEADERS
ecm_generate_headers(AkonadiCore_base_CC_HEADERS
HEADER_NAMES
AbstractDifferencesReporter
AgentConfigurationBase
......@@ -115,7 +115,6 @@ akonadi_generate_headers_with_deprecated(AkonadiCore_base_CC_HEADERS
CollectionPathResolver
REQUIRED_HEADERS AkonadiCore_base_HEADERS
PREFIX Akonadi
DEPRECATED_DESTINATION ${AkonadiCore_INSTALL_INCLUDEDIR}
)
set(akonadicore_attributes_SRCS
......@@ -136,7 +135,7 @@ set(akonadicore_attributes_SRCS
attributes/tagattribute.cpp
)
akonadi_generate_headers_with_deprecated(AkonadiCore_attributes_CC_HEADERS
ecm_generate_headers(AkonadiCore_attributes_CC_HEADERS
HEADER_NAMES
Attribute
CollectionColorAttribute
......@@ -154,7 +153,6 @@ akonadi_generate_headers_with_deprecated(AkonadiCore_attributes_CC_HEADERS
REQUIRED_HEADERS AkonadiCore_attributes_HEADERS
RELATIVE attributes
PREFIX Akonadi
DEPRECATED_DESTINATION ${AkonadiCore_INSTALL_INCLUDEDIR}
)
set(akonadicore_models_SRCS
......@@ -177,7 +175,7 @@ set(akonadicore_models_SRCS
models/trashfilterproxymodel.cpp
)
akonadi_generate_headers_with_deprecated(AkonadiCore_models_CC_HEADERS
ecm_generate_headers(AkonadiCore_models_CC_HEADERS
HEADER_NAMES
AgentFilterProxyModel
AgentInstanceModel
......@@ -196,7 +194,6 @@ akonadi_generate_headers_with_deprecated(AkonadiCore_models_CC_HEADERS
REQUIRED_HEADERS AkonadiCore_models_HEADERS
RELATIVE models
PREFIX Akonadi
DEPRECATED_DESTINATION ${AkonadiCore_INSTALL_INCLUDEDIR}
)
set(akonadicore_jobs_SRCS
......@@ -243,7 +240,7 @@ set(akonadicore_jobs_SRCS
jobs/unlinkjob.cpp
)
akonadi_generate_headers_with_deprecated(AkonadiCore_jobs_CC_HEADERS
ecm_generate_headers(AkonadiCore_jobs_CC_HEADERS
HEADER_NAMES
AgentInstanceCreateJob
CollectionAttributesSynchronizationJob
......@@ -283,7 +280,6 @@ akonadi_generate_headers_with_deprecated(AkonadiCore_jobs_CC_HEADERS
REQUIRED_HEADERS AkonadiCore_jobs_HEADERS
RELATIVE jobs
PREFIX Akonadi
DEPRECATED_DESTINATION ${AkonadiCore_INSTALL_INCLUDEDIR}
)
set(akonadicore_dbus_xml ${Akonadi_SOURCE_DIR}/src/interfaces/org.freedesktop.Akonadi.NotificationManager.xml)
......
......@@ -21,12 +21,11 @@ PUBLIC
KF5::Crash
)
akonadi_generate_headers_with_deprecated(shared_CC_HEADERS
ecm_generate_headers(shared_CC_HEADERS
HEADER_NAMES
VectorHelper
REQUIRED_HEADERS shared_HEADERS
PREFIX Akonadi
DEPRECATED_DESTINATION ${AkonadiCore_INSTALL_INCLUDEDIR}
)
# shared is not generally a public library, so install only the useful
......
......@@ -81,7 +81,7 @@ set(akonadiwidgets_UI
tagwidget.ui
)
akonadi_generate_headers_with_deprecated(AkonadiWidgets_CC_HEADERS
ecm_generate_headers(AkonadiWidgets_CC_HEADERS
HEADER_NAMES
AgentActionManager
AgentConfigurationDialog
......@@ -113,7 +113,6 @@ akonadi_generate_headers_with_deprecated(AkonadiWidgets_CC_HEADERS
TagSelectWidget
REQUIRED_HEADERS AkonadiWidgets_HEADERS
PREFIX Akonadi
DEPRECATED_DESTINATION ${AkonadiWidgets_INSTALL_INCLUDEDIR}
)
ki18n_wrap_ui(KF5AkonadiWidgets ${akonadiwidgets_UI})
......
......@@ -25,7 +25,7 @@ set(akonadixml_SRCS
# base install include dir
set(AkonadiXml_INSTALL_INCLUDEDIR "${KDE_INSTALL_INCLUDEDIR_KF5}/AkonadiXml")
akonadi_generate_headers_with_deprecated(AkonadiXml_CC_HEADERS
ecm_generate_headers(AkonadiXml_CC_HEADERS
HEADER_NAMES
XmlDocument
XmlReader
......@@ -33,7 +33,6 @@ akonadi_generate_headers_with_deprecated(AkonadiXml_CC_HEADERS
XmlWriter
REQUIRED_HEADERS AkonadiXml_HEADERS
PREFIX Akonadi
DEPRECATED_DESTINATION ${AkonadiXml_INSTALL_INCLUDEDIR}
)
add_executable(akonadi2xml akonadi2xml.cpp)
......
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