Skip to content

update: find qt by qt_sdkver option#6457

Merged
waruqi merged 1 commit intoxmake-io:devfrom
binLep:dev
May 16, 2025
Merged

update: find qt by qt_sdkver option#6457
waruqi merged 1 commit intoxmake-io:devfrom
binLep:dev

Conversation

@binLep
Copy link
Contributor

@binLep binLep commented May 16, 2025

前言

  • 系统:AOSC OS

存在的 qmake 文件名如下

root@aosc-binlep [ bin ] # qmak
qmake       qmake6-qt6  qmake-qt5   qmake-qt6

原有行为

通过默认的 sdkdir 直接找 qmake 文件,找到后用 qmake 来获取对应 QT 的版本

加了 qt_sdkver 是不能获取同目录路径下其他 QT 主项目的

获取的信息如下所示

binlep@aosc-binlep [ LepTV@master ] $ xmake f -m debug --qt_sdkver=6.8.2
checking for platform ... linux
checking for architecture ... x86_64
checking for Qt SDK directory ... /usr
checking for Qt SDK version ... 5.15.16

修改后行为

不指定 qt_sdkver

获取 qmake 对应的版本

$ xmake f -m debug
checking for platform ... linux
checking for architecture ... x86_64
checking for Qt SDK directory ... /usr
checking for Qt SDK version ... 5.15.16

指定 qt_sdkver

获取 qt_sdkver 指定的主版本,这里写的 6.8.3,获取的是系统的 6.8.2

xmake f -m debug --qt_sdkver=6.8.3
checking for platform ... linux
checking for architecture ... x86_64
checking for Qt SDK directory ... /usr
checking for Qt SDK version ... 6.8.2

其他

如果啥都没搜到的话,(通过 qmake)优先获取 qt6 的版本,再获取 qt5 的版本,最后用默认的版本

@binLep binLep closed this May 16, 2025
@binLep binLep reopened this May 16, 2025
@binLep
Copy link
Contributor Author

binLep commented May 16, 2025

刚刚编译失败了,我还以为还有链接问题需要修改,就把 pr 关闭了

然后我发现执行 xmake build --rebuild 后,也就是刷新生成目录后,就好了,目前应该没啥问题

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The compilation failed just now, and I thought there was still a link problem that needed to be modified, so I closed pr

Then I found that after executing xmake build --rebuild, that is, after refreshing the generated directory, it's fine. There should be no problem at the moment

@waruqi waruqi merged commit 8048be7 into xmake-io:dev May 16, 2025
24 of 44 checks passed
@waruqi waruqi added this to the v3.0.0 milestone May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants