From d712a6bebf094dcb2af69578f77fc31b28ebfed3 Mon Sep 17 00:00:00 2001 From: Tony Weng Date: Sun, 2 Jun 2019 13:12:12 +0800 Subject: [PATCH] Fix Fail to Build Examples if ARDUINO_SDK_PATH is not in Default Paths - If the variable ARDUINO_SDK_PATH is given by the command line `cmake ... -DARDUINO_SDK_PATH=` rather than `export ARDUINO_SDK_PATH=`, the examples are failed to build and output error in ArduinoSDKSeeker.cmake with unknown reason, though it's cached. --- cmake/Arduino-Toolchain.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/Arduino-Toolchain.cmake b/cmake/Arduino-Toolchain.cmake index ced8e46..2040946 100644 --- a/cmake/Arduino-Toolchain.cmake +++ b/cmake/Arduino-Toolchain.cmake @@ -67,6 +67,7 @@ else () # Set default path if none is set find_arduino_sdk(arduino_sdk_path) set(ARDUINO_SDK_PATH "${arduino_sdk_path}" CACHE PATH "Arduino SDK Path") + set(ENV{ARDUINO_SDK_PATH} "${ARDUINO_SDK_PATH}") endif () _setup_sdk_internal_paths()