Skip to content

Commit 10175f0

Browse files
committed
build(qt): update qt path
1 parent e78a219 commit 10175f0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
if: matrix.os == 'macOS-latest'
3434
run: |
3535
brew install qt@5
36-
echo "Qt5_DIR=$(brew --prefix qt@5)/lib/cmake/Qt5" >> $GITHUB_ENV
36+
echo "Qt5_DIR=$(brew --prefix qt@5)/lib/cmake" >> $GITHUB_ENV
3737
echo "QT_PLUGIN_PATH=$(brew --prefix qt@5)/plugins" >> $GITHUB_ENV
3838
echo "QML2_IMPORT_PATH=$(brew --prefix qt@5)/qml" >> $GITHUB_ENV
3939

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ set(CMAKE_AUTOUIC ON)
3434
# 查找Qt5核心和窗口部件模块
3535
find_package(PkgConfig REQUIRED)
3636
pkg_check_modules(QT5 REQUIRED IMPORTED_TARGET Qt5Core Qt5Widgets)
37-
set(CMAKE_PREFIX_PATH "/opt/homebrew/Cellar/qt@5/5.15.16_2/lib/cmake") # hard coded for convenience
37+
set(CMAKE_PREFIX_PATH $ENV{Qt5_DIR})
3838
find_package(Qt5 REQUIRED COMPONENTS Core Widgets) # I don't know why using pkg-config solely doesn't work for automoc etc
3939

4040
# 添加子目录

0 commit comments

Comments
 (0)