Spirik / GEM

Good Enough Menu for Arduino
GNU Lesser General Public License v3.0
239 stars 36 forks source link

Allow exclusion of libraries using defines #41

Closed danieltwagner closed 2 years ago

danieltwagner commented 2 years ago

Thank you for creating this library! I was building it using platform.io and preferred not to include libraries I wasn't using, especially since AltSerialGraphicLCD isn't available through the nifty lib_deps functionality in Platform.io

This change allows other Platform.io users to selectively exclude libraries like so:

[env:esp32dev]
[...]
lib_deps = 
    adafruit/Adafruit BusIO@^1.7.3
    adafruit/Adafruit ST7735 and ST7789 Library@^1.7.3
        spirik/GEM@^1.3.2
build_flags =
    -DGEM_EXCLUDE_GLCD
    -DGEM_EXCLUDE_U8G2

The existing instructions for your README's Configuration section still apply for Arduino IDE users.

Spirik commented 2 years ago

That's a great suggestion! Thank you=) Will be able to manage this PR later today.

Spirik commented 2 years ago

Did a little refactoring (renamed flags to GEM_DISABLE_*), updated Configuration readme section accordingly. Changes will be available with the next release 1.3.3, once Library Manager crawler fetches them.

Thank you once again for your contribution!=)

danieltwagner commented 2 years ago

Awesome, thank you!