Commit bb2c08c 1 parent 81f072b commit bb2c08c Copy full SHA for bb2c08c
File tree 1 file changed +8
-20
lines changed
1 file changed +8
-20
lines changed Original file line number Diff line number Diff line change @@ -43,27 +43,15 @@ if (BUILD_GSTREAMER_PLUGIN)
43
43
find_package (Qt4)
44
44
include (${QT_USE_FILE} )
45
45
else ()
46
- if (APPLE )
47
- # We need to find the path of the Qt libs and cmake config installed by brew,
48
- # e.g. /usr/local/Cellar/qt/5.13.1/lib/cmake/Qt5Core
49
- execute_process (COMMAND /usr/local/opt/qt/bin/qtpaths --install -prefix
50
- OUTPUT_VARIABLE qt_install_path
51
- OUTPUT_STRIP_TRAILING_WHITESPACE)
52
- message (STATUS "QT install path: ${qt_install_path} " )
53
- find_package (Qt5Core
54
- CONFIG
55
- PATHS "${qt_install_path} /lib/cmake/Qt5Core"
56
- NO_DEFAULT_PATH
57
- REQUIRED)
58
- find_package (Qt5Widgets
59
- CONFIG
60
- PATHS ${qt_install_path} /lib/cmake/Qt5Widgets
61
- NO_DEFAULT_PATH
62
- REQUIRED)
63
- else ()
64
- find_package (Qt5Core REQUIRED)
65
- find_package (Qt5Widgets REQUIRED)
46
+ # In order to find Qt5 in macOS, the Qt5 path needs to be added to the CMake prefix path.
47
+ if (APPLE )
48
+ execute_process (COMMAND brew --prefix qt5
49
+ ERROR_QUIET
50
+ OUTPUT_VARIABLE QT5_PREFIX_PATH
51
+ )
52
+ list (APPEND CMAKE_PREFIX_PATH "${QT5_PREFIX_PATH} " )
66
53
endif ()
54
+ find_package (Qt5 COMPONENTS Core Widgets REQUIRED)
67
55
endif ()
68
56
endif ()
69
57
endif ()
You can’t perform that action at this time.
0 commit comments