lbussy / LCBUrl

Arduino library for handling URLs
MIT License
7 stars 1 forks source link

Allow Not Using mDNS #28

Closed lbussy closed 2 years ago

lbussy commented 3 years ago

Currently, mDNS requirements are rigid:

In file included from .pio\libdeps\lolin_d32_pro\LCBUrl\src\LCBUrl.cpp:32:0:
.pio\libdeps\lolin_d32_pro\LCBUrl\src\LCBUrl.h:41:21: fatal error: ESPmDNS.h: No such file or directory

I should be able to conditionally compile this.

lbussy commented 3 years ago

With this change, in order to use mDNS functions, an explicit declaration must be made:

#define LCBURL_MDNS
#include <LCBUrl.h>

While this is a breaking change, I think this is the right way to do it - someone not wishing to use MDNS should not have to take any action to remove compile errors.