Skip to content
Commit 0397c2b8 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Install headers with C++ namespace prefix, to avoid lookup conflicts

So far headers for the libraries AknoadiCore, AkonadiWidgtets, AkonadiXml,
and AkonadiAgents were installed directly into the directory given as
include base dir, as e.g. noted in the link interface.
Due to generic names of the headers, without the project prefix, e.g.
#include <item.h>
#include <job.h>
could run chance to instead match other headers from the include
directories of other projects.

Given the practice to uee the C++ namespace as path prefix in the
include dirs, this patch changes the installation to install the normal
headers into an akonadi/ and the CamelCase headers into a Akonadi/ subdir
of the respective base include dir, so projects linking to Akonadi
libraries can then use
#include <akonadi/item.h>
or
#include <Akonadi/Item>
with less chance to have the wrong headers picked.

To make the headers from AkonadiAgents, AkonadiWidgets and AkonadiXml
properly work also when being used from their installed location,
they need to be adapted to also use the proper <akonadi/foo.h> includes
for the headers from AkonadiCore. ecm_generate_headers() helps with
that to work also in the own build by adding matching forwarding headers
in the build dir.

To keep projects linking to Akonadi libraries building for now,
additionally compat headers are installed to the old locations,
emitting compiler warnings hinting the new desired include paths
to be used.
parent bc0c31ce
Pipeline #79187 canceled with stage
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