mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-02-22 15:39:57 -05:00
Set new default location hints for Qt on macOS
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.
This commit is contained in:
parent
33d8b6db62
commit
d181f80c8c
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user