Skip to content

Commit

Permalink
chore: Improve finding Homebrew's Qt5 on macOS (EdgeTX#4291)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelcoeffic authored Dec 13, 2023
1 parent 2ffd0c5 commit b66e822
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cmake/QtDefs.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
if(APPLE AND EXISTS /usr/local/opt/qt5)
# Homebrew installs Qt5 (up to at least 5.9.1) in
# /usr/local/qt5, ensure it can be found by CMake since
# it is not in the default /usr/local prefix.
list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
if(APPLE AND DEFINED ENV{HOMEBREW_PREFIX} AND EXISTS $ENV{HOMEBREW_PREFIX}/opt/qt@5)
# If Homebrew is used, HOMEBREW_PREFIX should be defined
list(APPEND CMAKE_PREFIX_PATH "$ENV{HOMEBREW_PREFIX}/opt/qt@5")
endif()

set(CMAKE_AUTOMOC ON)
Expand Down

0 comments on commit b66e822

Please sign in to comment.