diff options
author | Nikolas Grottendieck <git@nikolasgrottendieck.com> | 2022-07-31 14:39:35 +0300 |
---|---|---|
committer | Jonathan White <support@dmapps.us> | 2022-09-12 05:33:47 +0300 |
commit | 1d30f22943532dc945d33094f0d0ddfb8017e6c9 (patch) | |
tree | f6ef8ed77b2747e976ab1d110299f7ddc12b2b94 | |
parent | d72a441a1fe9206719bee871e4a8c3cfc7f55a87 (diff) |
Set new default location hints for Qt on macOSbackport-2.7.2
QT5 as offered by Homebrew is versioned since March 2021 and the default
path points to QT6 (if installed). New installations of qt5 have a
suffixed path (qt@5) that should be used instead.
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ccff9149..55395a4af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -479,14 +479,14 @@ if(UNIX AND NOT APPLE) find_package(Qt5 COMPONENTS ${QT_COMPONENTS} DBus REQUIRED) elseif(APPLE) find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED HINTS - /usr/local/opt/qt/lib/cmake - /usr/local/Cellar/qt/*/lib/cmake - /opt/homebrew/opt/qt/lib/cmake + /usr/local/opt/qt@5/lib/cmake + /usr/local/Cellar/qt@5/*/lib/cmake + /opt/homebrew/opt/qt@5/lib/cmake ENV PATH) find_package(Qt5 COMPONENTS MacExtras HINTS - /usr/local/opt/qt/lib/cmake - /usr/local/Cellar/qt/*/lib/cmake - /opt/homebrew/opt/qt/lib/cmake + /usr/local/opt/qt@5/lib/cmake + /usr/local/Cellar/qt@5/*/lib/cmake + /opt/homebrew/opt/qt@5/lib/cmake ENV PATH) else() find_package(Qt5 COMPONENTS ${QT_COMPONENTS} REQUIRED) @@ -497,6 +497,10 @@ if(Qt5Core_VERSION VERSION_LESS "5.2.0") endif() get_filename_component(Qt5_PREFIX ${Qt5_DIR}/../../.. REALPATH) +if(APPLE) + # Add includes under Qt5 Prefix in case Qt6 is also installed + include_directories(SYSTEM ${Qt5_PREFIX}/include) +endif() # Process moc automatically set(CMAKE_AUTOMOC ON) |