queezythegreat / arduino-cmake

Arduino CMake Build system
644 stars 216 forks source link

cd build/ && cmake .. fails when building arduino-cmake #45

Closed eschulte closed 12 years ago

eschulte commented 12 years ago

With all dependencies installed on an up-to-date Arch Linux system following the instillation instructions in the README I get the following error after running cmake .. from a build directory in the base of the repository.

-- Generating example Wire-master_writer
-- Generating blink_original
CMake Error at cmake/Platform/Arduino.cmake:1333 (message):
  Sketch does not exist:
Call Stack (most recent call first):
  cmake/Platform/Arduino.cmake:300 (setup_arduino_sketch)
  example/CMakeLists.txt:20 (generate_arduino_firmware)

-- Configuring incomplete, errors occurred!

Any suggestions on how to fix this error will be greatly appreciated.

eschulte commented 12 years ago

This fixed the build on my system.

diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt
index 7170bc0..f28124d 100644
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -18,12 +18,12 @@ generate_arduino_example(Wire master_writer)
 # Original blink sketch (from Arduino SDK examples)
 #====================================================================#
 generate_arduino_firmware(blink_original
-    SKETCH ${ARDUINO_SDK_PATH}/examples/1.Basics/Blink
+    SKETCH ${ARDUINO_SDK_PATH}/examples/01.Basics/Blink
     PORT  /dev/ttyACM0
     BOARD uno)

 # Alternative: by variables
-#set(blink_original_SKETCH ${ARDUINO_SDK_PATH}/examples/1.Basics/Blink)
+#set(blink_original_SKETCH ${ARDUINO_SDK_PATH}/examples/01.Basics/Blink)
 #set(blink_original_PORT  ${ARDUINO_PORT})
 #set(blink_original_BOARD uno)
 #
queezythegreat commented 12 years ago

What version of the Arduino IDE is installed? They may have renamed the example directories.

eschulte commented 12 years ago

Yes, that is the problem. See my previous post for the changes required to fix the build on my system.

Thanks,