-
Notifications
You must be signed in to change notification settings - Fork 40
build(deps): add Qt5 compatibility support alongside Qt6 #577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds dual Qt5/Qt6 build support by relaxing Debian package dependencies and introducing automatic Qt version detection to drive the CMake configuration in debian/rules, while keeping Qt6 as the primary target. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lzwind
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缺包了 本地编译看下
c6e87f8 to
364b4bf
Compare
|
/merge |
|
This pr cannot be merged! (status: blocked) |
Update package dependencies and build configuration to support both Qt5 and Qt6 versions. The debian/control file now uses alternative syntax for Qt-related dependencies, allowing the package to build on systems with either Qt version. Added automatic Qt version detection in debian/rules to determine the appropriate CMake configuration at build time. This change improves package compatibility across different Debian/Ubuntu environments while maintaining the primary Qt6 support.
deepin pr auto review我来对这个diff进行详细的代码审查:
具体改进建议:
define detect_qt_version
ifneq (,$(shell which qmake6 2>/dev/null))
QT_VERSION_MAJOR := 6
QT_DIR := "/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt6"
else ifneq (,$(shell which qmake 2>/dev/null))
QT_VERSION_MAJOR := 5
QT_DIR := "/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt5"
else
$(error Neither Qt5 nor Qt6 found)
endif
endef
# 优先尝试Qt6
find_package(Qt6 COMPONENTS Core QUIET)
if(Qt6_FOUND)
set(QT_VERSION_MAJOR 6)
else()
# 回退到Qt5
find_package(Qt5 COMPONENTS Core REQUIRED)
set(QT_VERSION_MAJOR 5)
endif()
# 添加编译优化
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
endif()这些改进将提高代码的可维护性、性能和安全性,同时保持向后兼容性。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
Update package dependencies and build configuration to support both Qt5 and Qt6 versions. The debian/control file now uses alternative syntax for Qt-related dependencies, allowing the package to build on systems with either Qt version. Added automatic Qt version detection in debian/rules to determine the appropriate CMake configuration at build time. This change improves package compatibility across different Debian/Ubuntu environments while maintaining the primary Qt6 support.
Summary by Sourcery
Add dual Qt5/Qt6 compatibility to the Debian packaging and build configuration.
Build: