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

Commit f32b23b

Browse files
committed
Took new approach towards 'ARDUINO_SDK_PATH'.
To set it to a custom location, an environment variable must be defined. Also removed email notifications, again, as they require specific mails.
1 parent 1aae1aa commit f32b23b

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

appveyor.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
version: '{build}'
22
image: Visual Studio 2017
3-
notifications:
4-
- provider: Email
5-
on_build_success: false
63
environment:
74
matrix:
85
- ARDUINO_SDK_VERSION: 1.6.13

cmake/Arduino-Toolchain.cmake

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ endfunction()
3131

3232
function(_setup_sdk_internal_paths)
3333

34-
set(ARDUINO_SDK_BIN_PATH "${ARDUINO_CMAKE_SDK_PATH}/hardware/tools/avr/bin" CACHE PATH
34+
set(ARDUINO_SDK_BIN_PATH "${ARDUINO_SDK_PATH}/hardware/tools/avr/bin" CACHE PATH
3535
"Path to Arduino SDK's binaries folder")
36-
set(ARDUINO_SDK_ROOT_PATH "${ARDUINO_CMAKE_SDK_PATH}/hardware/tools/avr" CACHE PATH
36+
set(ARDUINO_SDK_ROOT_PATH "${ARDUINO_SDK_PATH}/hardware/tools/avr" CACHE PATH
3737
"Path to Arduino SDK's sys-root folder")
38-
set(ARDUINO_SDK_LIBRARIES_PATH "${ARDUINO_CMAKE_SDK_PATH}/libraries" CACHE PATH
38+
set(ARDUINO_SDK_LIBRARIES_PATH "${ARDUINO_SDK_PATH}/libraries" CACHE PATH
3939
"Path to SDK's libraries directory")
40-
set(ARDUINO_SDK_EXAMPLES_PATH "${ARDUINO_CMAKE_SDK_PATH}/examples" CACHE PATH
40+
set(ARDUINO_SDK_EXAMPLES_PATH "${ARDUINO_SDK_PATH}/examples" CACHE PATH
4141
"Path to SDK's examples directory")
4242

4343
endfunction()
@@ -52,14 +52,14 @@ endif ()
5252
set(ARDUINO_CMAKE_TOOLCHAIN_DIR ${CMAKE_CURRENT_LIST_DIR} CACHE PATH
5353
"Path to Arduino-CMake's toolchain directory")
5454

55+
message("SDK: $ENV{ARDUINO_SDK_PATH}")
56+
5557
# Set default path if none is set
56-
if (ARDUINO_SDK_PATH)
57-
set(ARDUINO_CMAKE_SDK_PATH "${ARDUINO_SDK_PATH}" CACHE PATH "Arduino SDK Path")
58+
if ($ENV{ARDUINO_SDK_PATH})
59+
set(ARDUINO_SDK_PATH "${ARDUINO_SDK_PATH}" CACHE PATH "Arduino SDK Path")
5860
else ()
59-
if (NOT DEFINED ARDUINO_CMAKE_SDK_PATH) # Custom path has already been set
60-
find_arduino_sdk(arduino_sdk_path)
61-
set(ARDUINO_CMAKE_SDK_PATH "${arduino_sdk_path}" CACHE PATH "Arduino SDK Path")
62-
endif ()
61+
find_arduino_sdk(arduino_sdk_path)
62+
set(ARDUINO_SDK_PATH "${arduino_sdk_path}" CACHE PATH "Arduino SDK Path")
6363
endif ()
6464

6565
_setup_sdk_internal_paths()

cmake/Platform/Other/FindArduinoSDK.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function(find_arduino_sdk _return_var)
1717

1818
find_program(arduino_program_path
1919
NAMES arduino
20-
PATHS ${platform_search_paths}
20+
HINTS ${platform_search_paths}
2121
NO_DEFAULT_PATH
2222
NO_CMAKE_FIND_ROOT_PATH)
2323
get_filename_component(sdk_path "${arduino_program_path}" DIRECTORY)

cmake/Platform/System/PlatformInitializer.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function(initialize_arduino_platform)
4343
set(ARDUINO_CMAKE_PLATFORM_NAME "arduino" CACHE STRING "")
4444
endif ()
4545
set(ARDUINO_CMAKE_PLATFORM_ARCHITECTURE "avr" CACHE STRING "")
46-
string(CONCAT platform_path "${ARDUINO_CMAKE_SDK_PATH}"
46+
string(CONCAT platform_path "${ARDUINO_SDK_PATH}"
4747
/hardware/
4848
"${ARDUINO_CMAKE_PLATFORM_NAME}/"
4949
"${ARDUINO_CMAKE_PLATFORM_ARCHITECTURE}")

cmake/Platform/System/VersionDetector.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function(detect_sdk_version)
5151

5252
find_file(ARDUINO_CMAKE_VERSION_FILE_PATH
5353
NAMES version.txt
54-
PATHS "${ARDUINO_CMAKE_SDK_PATH}"
54+
PATHS "${ARDUINO_SDK_PATH}"
5555
PATH_SUFFIXES lib
5656
DOC "Path to Arduino's version file"
5757
NO_CMAKE_FIND_ROOT_PATH)
@@ -86,6 +86,6 @@ function(detect_sdk_version)
8686
_get_normalized_sdk_version(normalized_sdk_version)
8787
set(runtime_ide_version "${normalized_sdk_version}" CACHE STRING "")
8888

89-
message(STATUS "Arduino SDK version ${ARDUINO_CMAKE_SDK_VERSION}: ${ARDUINO_CMAKE_SDK_PATH}")
89+
message(STATUS "Arduino SDK version ${ARDUINO_CMAKE_SDK_VERSION}: ${ARDUINO_SDK_PATH}")
9090

9191
endfunction()

0 commit comments

Comments
 (0)