queezythegreat / arduino-cmake

Arduino CMake Build system
646 stars 217 forks source link

Typo in ArduinoToolchain.cmake and new hint suggestion #68

Closed chffelix closed 11 years ago

chffelix commented 11 years ago

Hi,

I just found your project today and it is really nice and helpful. Thanks for your effort!

Since I use Slackware, I usually compile most packages which are not part of the official distro with "slackbuild scripts" from http://slackbuilds.org. Arduino falls in this case and from its slackbuild script it ends up in /opt/arduino, which is not on the paths hinted to SDK_PATH_HINTS. While looking at it I spotted a typo on "/opt/local/ardiuno" so I corrected it and added /opt/arduino as a hint too:

diff --git a/cmake/ArduinoToolchain.cmake b/cmake/ArduinoToolchain.cmake
index 8b0a206..16e4037 100644
--- a/cmake/ArduinoToolchain.cmake
+++ b/cmake/ArduinoToolchain.cmake
@@ -53,7 +53,8 @@ if(NOT ARDUINO_SDK_PATH)
     endforeach()

     file(GLOB SDK_PATH_HINTS /usr/share/arduino*
-                             /opt/local/ardiuno*
+                             /opt/local/arduino*
+                             /opt/arduino*
                              /usr/local/share/arduino*)
     list(SORT SDK_PATH_HINTS)
     list(REVERSE SDK_PATH_HINTS)
queezythegreat commented 11 years ago

Nice, I will integrate your bug fix when I have some time. Thanks for submitting your patch, in the future please send me a pull request.

chffelix commented 11 years ago

Cool. I can send you the pull request too... it is good so I get used to github usual workflow.

chffelix commented 11 years ago

Pull request done! I guess I did it right, if not please tell me (first time I use this...). Thanks!

queezythegreat commented 11 years ago

Thanks, I've accepted your pull request and added you to the list of contributors!