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

Commit 649e8f2

Browse files
Use MATCHES "NOTFOUND" for variable checks
1 parent d35d054 commit 649e8f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmake/Platform/Other/ArduinoSDKSeeker.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ function(find_arduino_sdk_bin _return_var)
5858
else ()
5959
# Some systems like the Arch Linux arduino package install binaries to /usr/bin
6060
find_program(avr_gcc_location avr-gcc)
61-
if (avr_gcc_location)
62-
get_filename_component(avr_gcc_parent ${avr_gcc_location} DIRECTORY)
63-
set(${_return_var} "${avr_gcc_parent}" PARENT_SCOPE)
64-
else ()
61+
if ("${avr_gcc_location}" MATCHES "NOTFOUND")
6562
string(CONCAT error_message
6663
"Couldn't find Arduino bin path - Is it in a non-standard location?" "\n"
6764
"If so, please set the ARDUINO_SDK_BIN_PATH CMake-Variable")
6865
message(FATAL_ERROR ${error_message})
66+
else ()
67+
get_filename_component(avr_gcc_parent ${avr_gcc_location} DIRECTORY)
68+
set(${_return_var} "${avr_gcc_parent}" PARENT_SCOPE)
6969
endif ()
7070
endif ()
7171

0 commit comments

Comments
 (0)