queezythegreat / arduino-cmake

Arduino CMake Build system
644 stars 216 forks source link

CMake unable to find Arduino.app on OSX #28

Closed astromme closed 12 years ago

astromme commented 12 years ago

After installing the stock Arduino 1.0 from the website arduino-cmake is unable to find it, giving the following error:

CMake Error at /usr/local/Cellar/cmake/2.8.6/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find Arduino (missing: ARDUINO_SDK_PATH ARDUINO_SDK_VERSION)
  (Required is at least version "1.0")

I see that cmake/modules/Platform/ArduinoPaths.cmake appends /Applications to the CMAKE_SYSTEM_PREFIX_PATH but that doesn't seem to be working.

queezythegreat commented 12 years ago

Intresting... The directory structure might have changed. I'm expecting to have Arduino.app installed in /Applications. Within Arduino.app I'm looking for Contents/Resources/Java/ (thats where the Arduino SDK is located).

astromme commented 12 years ago

Hmm, that path definitely exists for me:

$ ls /Applications/Arduino.app/Contents/Resources/Java
__MACOSX  libraries     core.jar          libquaqua64.jnilib    revisions.txt
examples  reference     ecj.jar           librxtxSerial.jnilib
hardware  tools         jna.jar           pde.jar
lib       RXTXcomm.jar  libquaqua.jnilib  quaqua.jar

The version seems to be correct.

$ cat /Applications/Arduino.app/Contents/Resources/Java/lib/version.txt
1.0%

(I think the % is zsh telling me that there is no newline at the end of the file)

queezythegreat commented 12 years ago

I'm assuming that you have specified the toolchain file either in the main CMakeList.txt before the project() command or on the command line.

I don't have Mac OS X on hand, so I cannot really reproduce your problem. Could you provide some additional information, such as the output, the main configuration file, and the CMakeCache.txt file...

astromme commented 12 years ago

Hmm, it appears to work now. I'm not sure if I updated some part of my system without realizing it or if I just was imaging it in the first place but I'm going to close this issue now. Thanks for your help!