CLionArduinoPlugin icon indicating copy to clipboard operation
CLionArduinoPlugin copied to clipboard

The easiest way to install a library

Open ZONT3 opened this issue 5 years ago • 1 comments

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?

ZONT3 avatar Dec 31 '20 15:12 ZONT3

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.

mmontag avatar Jan 18 '22 10:01 mmontag