Skip to content

Commit 5695b0d

Browse files
authored
Merge pull request avrdudes#950 from hallard/patch-1
fix M1 homebrew path
2 parents 4601bee + a23055d commit 5695b0d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,13 @@ case "${ostype}" in
5050
then
5151
build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/opt/local/include -D CMAKE_EXE_LINKER_FLAGS=-L/opt/local/lib"
5252
else
53-
build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/usr/local/include -D CMAKE_EXE_LINKER_FLAGS=-L/usr/local/Cellar"
53+
# Apple M1 (may be new version of homebrew also)
54+
if [ -d /opt/homebrew ]
55+
then
56+
build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/opt/homebrew/include -D CMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/Cellar"
57+
else
58+
build_flags="${build_flags} -D CMAKE_C_FLAGS=-I/usr/local/include -D CMAKE_EXE_LINKER_FLAGS=-L/usr/local/Cellar"
59+
fi
5460
fi
5561
;;
5662

0 commit comments

Comments
 (0)