Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Fix Fail to Build Examples if ARDUINO_SDK_PATH is not in Default Paths #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/Arduino-Toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I would wrap it in a conditional that applies only in the case where the env var isn't defined, as it's user's responsibility to set it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. This behavior is really weird even the variable has been cached in the file CMakeCache.txt. I've checked this set won't affect the environment variables. I'll track on this to make a better solution.

endif ()

_setup_sdk_internal_paths()
Expand Down