Skip to content

Commit

Permalink
add ARM64/Apple M1 support to build.sh (darktable-org#10178)
Browse files Browse the repository at this point in the history
* add ARM64/Apple M1 support to build.sh

determines CPU architecture by `uname -a
  • Loading branch information
jonastr authored Oct 11, 2021
1 parent ec81924 commit af614a6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,21 @@ done
CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:-}
CMAKE_MORE_OPTIONS="${CMAKE_MORE_OPTIONS} ${CMAKE_PREFIX_PATH}"


# ---------------------------------------------------------------------------
# Determine CPU architecture
# ---------------------------------------------------------------------------

CPU_ARCHITECTURE=""
if [[ `uname -a` =~ ^Darwin.* ]] && [[ `uname -a` =~ .*arm64$ ]]
then
CPU_ARCHITECTURE="ARM64"
CMAKE_MORE_OPTIONS="${CMAKE_MORE_OPTIONS} -DBUILD_SSE2_CODEPATHS=OFF"
else
CPU_ARCHITECTURE="Intel"
fi


# ---------------------------------------------------------------------------
# Let's go
# ---------------------------------------------------------------------------
Expand All @@ -323,6 +338,7 @@ Installation prefix: $INSTALL_PREFIX
Build type: $BUILD_TYPE
Build generator: $BUILD_GENERATOR
Build tasks: $MAKE_TASKS
CPU Architecture: $CPU_ARCHITECTURE
EOF

Expand Down

0 comments on commit af614a6

Please sign in to comment.