mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-22 23:24:22 +08:00
Fix qt5_found handling
This commit is contained in:
parent
64e7aa4c46
commit
6562c22029
1 changed files with 19 additions and 12 deletions
|
@ -12,22 +12,29 @@ endif()
|
|||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
if(APPLE AND EXISTS /usr/local/opt/qt5)
|
||||
# Homebrew installs Qt5 (up to at least 5.11.0) in
|
||||
# /usr/local/qt5. Ensure that it can be found by CMake
|
||||
# since it is not in the default /usr/local prefix.
|
||||
# Add it to PATHS so that it doesn't override the
|
||||
# CMAKE_PREFIX_PATH environment variable.
|
||||
# QT_FIND_PACKAGE_OPTIONS should be passed to find_package,
|
||||
# e.g. find_package(Qt5Core ${QT_FIND_PACKAGE_OPTIONS})
|
||||
list(APPEND QT_FIND_PACKAGE_OPTIONS PATHS /usr/local/opt/qt5)
|
||||
# Homebrew installs Qt5 (up to at least 5.11.0) in
|
||||
# /usr/local/qt5. Ensure that it can be found by CMake
|
||||
# since it is not in the default /usr/local prefix.
|
||||
# Add it to PATHS so that it doesn't override the
|
||||
# CMAKE_PREFIX_PATH environment variable.
|
||||
# QT_FIND_PACKAGE_OPTIONS should be passed to find_package,
|
||||
# e.g. find_package(Qt5Core ${QT_FIND_PACKAGE_OPTIONS})
|
||||
list(APPEND QT_FIND_PACKAGE_OPTIONS PATHS /usr/local/opt/qt5)
|
||||
endif()
|
||||
set(QT_PACKAGELIST
|
||||
Qt5Core
|
||||
Qt5Widgets
|
||||
Qt5Gui
|
||||
Qt5Core
|
||||
Qt5Widgets
|
||||
Qt5Gui
|
||||
)
|
||||
foreach(_qt_package IN LISTS QT_PACKAGELIST)
|
||||
find_package(${_qt_package} REQUIRED ${QT_FIND_PACKAGE_OPTIONS})
|
||||
find_package(${_qt_package} REQUIRED ${QT_FIND_PACKAGE_OPTIONS})
|
||||
endforeach()
|
||||
|
||||
set(Qt5_FOUND ON)
|
||||
foreach(_qt_package IN LISTS QT_PACKAGELIST)
|
||||
if(NOT ${_qt_package}_FOUND)
|
||||
set(Qt5_FOUND OFF)
|
||||
endif(NOT ${_qt_package}_FOUND)
|
||||
endforeach()
|
||||
|
||||
SET (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
|
Loading…
Reference in a new issue