-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
set(WRONGBREW_BIN "$ENV{HOME}/wrongbrew.sh") | ||
|
||
execute_process(COMMAND "${WRONGBREW_BIN}" --prefix | ||
RESULT_VARIABLE DETECT_WRONGBREW | ||
OUTPUT_VARIABLE WRONGBREW_PREFIX | ||
ERROR_QUIET | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
|
||
execute_process(COMMAND "${WRONGBREW_BIN}" --prefix qt@5 | ||
OUTPUT_VARIABLE QT_PREFIX | ||
ERROR_QUIET | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
|
||
if(DETECT_WRONGBREW EQUAL 0) | ||
list(APPEND CMAKE_PREFIX_PATH "${WRONGBREW_PREFIX};${QT_PREFIX}") | ||
set(CMAKE_APPLE_SILICON_PROCESSOR arm64) | ||
set(CMAKE_FIND_ROOT_PATH "${WRONGBREW_PREFIX}") | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) | ||
else() | ||
message(FATAL_ERROR "Could not invoke \"${WRONGBREW_BIN}\" --prefix") | ||
endif() | ||
|