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

Commit f6e08b4

Browse files
authored
Merge pull request #30 from taoyuan/develop
Fix Arduino SDK automatically detection on OSX
2 parents e1eb024 + 0d7b2cc commit f6e08b4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/Platform/Other/ArduinoSDKSeeker.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77
#=============================================================================#
88
function(find_arduino_sdk _return_var)
99

10+
set(path_suffixes "")
11+
1012
if (${CMAKE_HOST_UNIX})
1113
if (${CMAKE_HOST_APPLE})
1214
set(platform_search_paths ~/Applications /Applications /Developer/Applications
1315
/sw /opt/local)
16+
set(path_suffixes Arduino.app/Contents/Java/ Arduino.app/Contents/Resources/Java/)
1417
else () # Probably Linux
1518
file(GLOB platform_search_paths /usr/share/arduino* /opt/local/arduino* /opt/arduino*
1619
/usr/local/share/arduino*)
@@ -21,6 +24,7 @@ function(find_arduino_sdk _return_var)
2124

2225
find_path(ARDUINO_SDK_PATH
2326
NAMES lib/version.txt
27+
PATH_SUFFIXES ${path_suffixes}
2428
HINTS ${platform_search_paths}
2529
NO_DEFAULT_PATH
2630
NO_CMAKE_FIND_ROOT_PATH)
@@ -35,3 +39,4 @@ function(find_arduino_sdk _return_var)
3539
endif ()
3640

3741
endfunction()
42+

0 commit comments

Comments
 (0)