Skip to content

Commit

Permalink
Fix cross-compilation detection
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed May 25, 2024
1 parent 1a1474f commit 25163d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ jobs:
-B build \
-DCMAKE_INSTALL_PREFIX="../target" \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_PREFIX_PATH="$(~/wrongbrew.sh --prefix);$(~/wrongbrew.sh --prefix qt@5)" \ $CMAKE_OPTS \
-DCMAKE_PREFIX_PATH="$(~/wrongbrew.sh --prefix);$(~/wrongbrew.sh --prefix qt@5)" \
$CMAKE_OPTS \
-DUSE_WERROR=OFF
- name: Build
run: cmake --build build
Expand Down
3 changes: 1 addition & 2 deletions cmake/modules/DetectMachine.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ ENDIF(LMMS_BUILD_WIN32)

IF(LMMS_BUILD_APPLE)
# Detect cross-compilation. "wrongbrew" is a custom wrapper for homebrew
IF((CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" AND NOT LMMS_HOST_X86_64) OR
(CMAKE_OSX_ARCHITECTURES MATCHES "arm64" AND NOT LMMS_HOST_ARM64))
IF(CMAKE_APPLE_SILICON_PROCESSOR MATCHES "x86_64" OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64")
EXECUTE_PROCESS(COMMAND "$ENV{HOME}/wrongbrew.sh" --prefix RESULT_VARIABLE DETECT_WRONGBREW OUTPUT_VARIABLE WRONGBREW_PREFIX ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
ENDIF()

Expand Down

0 comments on commit 25163d5

Please sign in to comment.