francoiscampbell / CLionArduinoPlugin

A plugin for CLion that enables arduino-cmake integration.
155 stars 41 forks source link

Link with Arduino libaries #41

Open trailcode opened 6 years ago

trailcode commented 6 years ago

For user installed libraries I have not found how to get it to work. I have included link_directories(/Users/trailcode/Documents/Arduino/libraries) but it does not find the required libraries. If I copy the headers and .cpp files into the project and rename the .cpp files to .ino files it compiles and links.

This is on OSX

Any ideas?

trailcode commented 6 years ago

After doing some digging in Arduino.cmake I found this function: function(find_arduino_libraries VAR_NAME SRCS ARDLIBS) I renamed /Users/trailcode/Documents/Arduino/libraries/TimerOne-r11 to /Users/trailcode/Documents/Arduino/libraries/TimerOne To match #include And it worked!