Commit 84f4ad38 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Now all compile fine without deprecated akonadi headers

parent cfd1624a
Pipeline #82935 passed with stage
in 13 minutes and 52 seconds
......@@ -86,13 +86,6 @@ function(akonadi_add_xmllint_test)
add_test(${TEST_UNPARSED_ARGUMENTS} ${XMLLINT_EXECUTABLE} --noout --schema ${xsd_relpath} ${xml_relpath})
endfunction()
function(_akonadi_generate_compat_header compat_header header include_path)
set(content "#include <akonadi/${header}>\n")
# enable once all PIM repos have been adapted, too much noise before
string(APPEND content "#pragma message(\"Deprecated header, will be removed for Akonadi 5.19. Use #include <${include_path}> instead.\")\n")
file(GENERATE OUTPUT "${compat_header}" CONTENT "${content}")
endfunction()
function(akonadi_generate_headers_with_deprecated camelcase_forwarding_headers_var)
  • akonadi_generate_headers_with_deprecated should now also be replaced with the normal ecm_generate_headers again, akonadi_generate_headers_with_deprecated was just a wrapper to extend the latter with the additional feature to install the backward-compat headers.

Please register or sign in to reply
# extend as needed to support those ecm_generate_headers arguments akonadi cmake code does use
set(options)
......@@ -123,65 +116,5 @@ function(akonadi_generate_headers_with_deprecated camelcase_forwarding_headers_v
set(${ARG_REQUIRED_HEADERS} ${${ARG_REQUIRED_HEADERS}} PARENT_SCOPE)
endif ()
# compat headers to be removed before release of 5.19
if(PIM_VERSION VERSION_GREATER_EQUAL "5.18.80")
message(AUTHOR_WARNING "Remove usage of akonadi_generate_headers_with_deprecated()")
return()
endif()
# generated deprecated headers and install
set(compat_headers)
foreach(classname ${ARG_HEADER_NAMES})
string(TOLOWER ${classname} classname_lc)
set(HEADER_NAME "${classname_lc}.h")
# normal header
set(compat_header "${CMAKE_CURRENT_BINARY_DIR}/compat/${HEADER_NAME}")
_akonadi_generate_compat_header("${compat_header}" "${HEADER_NAME}" "akonadi/${HEADER_NAME}")
list(APPEND compat_headers ${compat_header})
# CamelCase header
set(compat_header "${CMAKE_CURRENT_BINARY_DIR}/compat/${classname}")
_akonadi_generate_compat_header("${compat_header}" "${HEADER_NAME}" "Akonadi/${classname}")
list(APPEND compat_headers ${compat_header})
endforeach()
install(FILES ${compat_headers}
DESTINATION ${ARG_DEPRECATED_DESTINATION}
COMPONENT Devel
)
endfunction()
function(akonadi_generate_deprecated_headers)
# extend as needed to support those ecm_generate_headers arguments akonadi cmake code does use
set(options)
set(oneValueArgs DEPRECATED_DESTINATION)
set(multiValueArgs HEADERS)
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
if (ARG_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unexpected argument to akonadi_generate_deprecated_headers: ${ARG_UNPARSED_ARGUMENTS}")
endif()
if (NOT ARG_DEPRECATED_DESTINATION)
message(FATAL_ERROR "DEPRECATED_DESTINATION argument is required with akonadi_generate_deprecated_headers")
endif()
# compat headers to be removed before release of 5.19
if(PIM_VERSION VERSION_GREATER_EQUAL "5.18.80")
message(AUTHOR_WARNING "Remove usage of akonadi_generate_deprecated_headers()")
return()
endif()
# generated deprecated headers and install
set(compat_headers)
foreach(HEADER_NAME ${ARG_HEADERS})
# normal header
set(compat_header "${CMAKE_CURRENT_BINARY_DIR}/compat/${HEADER_NAME}")
_akonadi_generate_compat_header("${compat_header}" "${HEADER_NAME}" "akonadi/${HEADER_NAME}")
list(APPEND compat_headers ${compat_header})
endforeach()
install(FILES ${compat_headers}
DESTINATION ${ARG_DEPRECATED_DESTINATION}
COMPONENT Devel
)
endfunction()
......@@ -26,10 +26,6 @@ akonadi_generate_headers_with_deprecated(AkonadiAgentBase_CC_HEADERS
KCONFIG_ADD_KCFG_FILES(KF5AkonadiAgentBase resourcebasesettings.kcfgc)
akonadi_generate_deprecated_headers(
HEADERS resourcebasesettings.h
DEPRECATED_DESTINATION ${AkonadiAgentBase_INSTALL_INCLUDEDIR}
)
qt_add_dbus_interfaces(akonadiagentbase_SRCS ${Akonadi_SOURCE_DIR}/src/interfaces/org.freedesktop.Akonadi.Tracer.xml )
......
......@@ -117,10 +117,6 @@ akonadi_generate_headers_with_deprecated(AkonadiCore_base_CC_HEADERS
PREFIX Akonadi
DEPRECATED_DESTINATION ${AkonadiCore_INSTALL_INCLUDEDIR}
)
akonadi_generate_deprecated_headers(
HEADERS qtest_akonadi.h
DEPRECATED_DESTINATION ${AkonadiCore_INSTALL_INCLUDEDIR}
)
set(akonadicore_attributes_SRCS
attributes/attribute.cpp
......
Supports Markdown
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