Skip to content

Install headers to path prefix matching the C++ namespace KDNSSD

The headers are in the same folder both in the sources & the install dir, and the export header is in the same install dir as well. Backward-compat headers are provided supporting version-controlled warnings & disabling reusing the macros provided by ecm_generate_export_header

There is no backward-compat file for kdnssd_export.h, it is assumed no 3rd-party explicitly includes it.

Tested with some API consumers, by first toggling either of

add_definitions(
    #-DKDNSSD_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055400
    #-DKDNSSD_DEPRECATED_WARNINGS_SINCE=0x055300
)

to trigger warnings or failed builds. As well as then doing the needed adaptions like

#include <kdnssd_version.h>
#if KDNSSD_VERSION >= QT_VERSION_CHECK(5, 84, 0)
#include <KDNSSD/RemoteService>
#include <KDNSSD/ServiceBrowser>
#include <KDNSSD/ServiceTypeBrowser>
#else
#include <DNSSD/RemoteService>
#include <DNSSD/ServiceBrowser>
#include <DNSSD/ServiceTypeBrowser>
#endif

Merge request reports