vsch / CLionArduinoPlugin

A plugin for CLion that enables arduino-cmake integration.
Apache License 2.0
64 stars 11 forks source link

The easiest way to install a library #47

Open ZONT3 opened 3 years ago

ZONT3 commented 3 years ago

Sorry for putting this question into an issue What is the easiest way to install an external library, like a Library Manager in the Arduino IDE? I want to use some of these (IRremote, etc.), which is present in Library Manager. So is there the way easier, than extracting .h and .cpp files from Arduino IDE folder?

mmontag commented 2 years ago

I wondered the same thing. One way is to create a libraries folder in your project and copy the library folder, like IRremote, into that subfolder. Then, in the CMakeLists.txt, you need to uncomment the line link_directories(${CMAKE_CURRENT_SOURCE_DIR}/libraries).

It's documented here (option 3): https://github.com/queezythegreat/arduino-cmake#arduino-libraries

I don't think it's wise to make the CMake project even more dependent on Arduino IDE folders.