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

Commit 0cdc53f

Browse files
committed
Skip sdk path fixing if no arduino installation found on MacOS
1 parent d5d678a commit 0cdc53f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

cmake/Platform/Other/FindArduinoSDK.cmake

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ function(find_arduino_sdk _return_var)
1919
NO_CMAKE_FIND_ROOT_PATH)
2020
get_filename_component(sdk_path "${arduino_program_path}" DIRECTORY)
2121

22-
if (${CMAKE_HOST_APPLE})
23-
get_filename_component(sdk_path "${sdk_path}" DIRECTORY)
24-
string(APPEND sdk_path "/Java")
25-
endif()
26-
2722
if (NOT sdk_path OR "${sdk_path}" MATCHES "NOTFOUND")
2823
string(CONCAT error_message
2924
"Couldn't find Arduino SDK path - Is it in a non-standard location?" "\n"
3025
"If so, please set the ARDUINO_SDK_PATH CMake-Variable")
3126
message(FATAL_ERROR ${error_message})
3227
else ()
28+
if (${CMAKE_HOST_APPLE})
29+
get_filename_component(sdk_path "${sdk_path}" DIRECTORY)
30+
string(APPEND sdk_path "/Java")
31+
endif()
3332
set(${_return_var} "${sdk_path}" PARENT_SCOPE)
3433
endif ()
3534

0 commit comments

Comments
 (0)