-
Notifications
You must be signed in to change notification settings - Fork 9
refactor: refactor CMake build system for unified DTK5/DTK6 support #23
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
Synchronize source files from linuxdeepin/dtklog. Source-pull-request: linuxdeepin/dtklog#23
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5",
"export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
"line_number": 13,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
]
} |
Synchronize source files from linuxdeepin/dtklog. Source-pull-request: linuxdeepin/dtklog#23
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5",
"export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
"line_number": 13,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
]
} |
Synchronize source files from linuxdeepin/dtklog. Source-pull-request: linuxdeepin/dtklog#23
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5",
"export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
"line_number": 13,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
]
} |
Synchronize source files from linuxdeepin/dtklog. Source-pull-request: linuxdeepin/dtklog#23
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5",
"export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
"line_number": 13,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
]
} |
Synchronize source files from linuxdeepin/dtklog. Source-pull-request: linuxdeepin/dtklog#23
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5",
"export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
"line_number": 13,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
]
} |
|
commit标题改一下,refactor重复了。 |
Synchronize source files from linuxdeepin/dtklog. Source-pull-request: linuxdeepin/dtklog#23
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5",
"export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
"line_number": 13,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
],
"archlinux/PKGBUILD": [
{
"line": "url=\"https://github.com/linuxdeepin/dtklog\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
]
} |
Synchronize source files from linuxdeepin/dtklog. Source-pull-request: linuxdeepin/dtklog#23
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5",
"export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
"line_number": 13,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
],
"archlinux/PKGBUILD": [
{
"line": "url=\"https://github.com/linuxdeepin/dtklog\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
]
} |
| SET (BUILD_WITH_SYSTEMD OFF CACHE BOOL "Build with systemd") | ||
|
|
||
| option(DTK5 "Build DTK5." ON) | ||
| if(DTK5) | ||
| set(DTK_VERSION_MAJOR "5") | ||
| set(DTK_NAME_SUFFIX "") | ||
| else() | ||
| set(DTK_VERSION_MAJOR "6") | ||
| set(DTK_NAME_SUFFIX "6") | ||
| endif() | ||
|
|
||
| set(DTK_VERSION_MINOR ${PROJECT_VERSION_MINOR}) | ||
| set(DTK_VERSION_PATCH ${PROJECT_VERSION_PATCH}) | ||
| # Set so version like 0.x.y, it's required for DTK library ABI compatibility. | ||
| set(DTK_VERSION "0.${DTK_VERSION_MINOR}.${DTK_VERSION_PATCH}") | ||
| set(QT_VERSION_MAJOR ${DTK_VERSION_MAJOR}) | ||
|
|
||
| SET (DLog "Dtk${DTK_NAME_SUFFIX}Log") |
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.
这里的命令有时候大写有时候小写,风格太不统一了,看起来费劲。
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.
这种下波让ai全部统一改下写法吧,只改语法的那种,
| VERSION ${CMAKE_PROJECT_VERSION} | ||
| SOVERSION ${CMAKE_PROJECT_VERSION_MAJOR} | ||
| VERSION ${DTK_VERSION} | ||
| SOVERSION "0" |
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.
我觉得这里还是让他们改比较好。soversion很少有为0的,最少也是1。
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.
这个版本不能随便动,如果要动的话,也可以之后统一去弄,现在这阶段保证两者统一构建后能兼容,
1. Replaced BUILD_WITH_QT6 option with DTK5 option for unified DTK5/DTK6 build control 2. Updated project configuration to support both DTK5 (Qt5) and DTK6 (Qt6) versions 3. Modified version handling to use DTK_VERSION (5.y.z or 6.y.z) instead of PROJECT_VERSION 4. Updated library naming: dtklog for DTK5 and dtk6log for DTK6 5. Enhanced Debian packaging to generate separate packages for DTK5 and DTK6 6. Added Build-Profiles support (nodtk5, nodtk6) for selective package building 7. Updated installation paths to include dtk5/ and dtk6/ subdirectories 8. Modified CMake config files to use DTK_NAME_SUFFIX for proper target naming Log: Updated build system to support both DTK5 and DTK6 versions Influence: 1. Test building with DTK5=ON (default) to ensure Qt5 compatibility 2. Test building with DTK5=OFF to ensure Qt6 compatibility 3. Verify library naming: libdtklog.so for DTK5, libdtk6log.so for DTK6 4. Check installation paths: include/dtk5/ for DTK5, include/dtk6/ for DTK6 5. Test Debian package building with different profiles (nodtk5, nodtk6) 6. Verify CMake config files generate correct target names (DtkLog vs Dtk6Log) 7. Ensure pkg-config files have correct dependencies (Qt5Core vs Qt6Core) refactor: 重构CMake构建系统以支持统一的DTK5/DTK6构建 1. 将BUILD_WITH_QT6选项替换为DTK5选项,用于统一的DTK5/DTK6构建控制 2. 更新项目配置以同时支持DTK5(Qt5)和DTK6(Qt6)版本 3. 修改版本处理逻辑,使用DTK_VERSION(5.y.z或6.y.z)替代PROJECT_VERSION 4. 更新库命名:DTK5使用dtklog,DTK6使用dtk6log 5. 增强Debian打包系统,为DTK5和DTK6生成独立的软件包 6. 添加Build-Profiles支持(nodtk5, nodtk6)用于选择性构建软件包 7. 更新安装路径,包含dtk5/和dtk6/子目录 8. 修改CMake配置文件以使用DTK_NAME_SUFFIX进行正确的目标命名 Log: 更新构建系统以同时支持DTK5和DTK6版本 Influence: 1. 测试使用DTK5=ON(默认)构建,确保Qt5兼容性 2. 测试使用DTK5=OFF构建,确保Qt6兼容性 3. 验证库命名:DTK5使用libdtklog.so,DTK6使用libdtk6log.so 4. 检查安装路径:DTK5使用include/dtk5/,DTK6使用include/dtk6/ 5. 测试使用不同配置文件(nodtk5, nodtk6)构建Debian软件包 6. 验证CMake配置文件生成正确的目标名称(DtkLog vs Dtk6Log) 7. 确保pkg-config文件具有正确的依赖关系(Qt5Core vs Qt6Core)
Synchronize source files from linuxdeepin/dtklog. Source-pull-request: linuxdeepin/dtklog#23
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5",
"export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
]
}
}
} |
|
Note
详情{
"CMakeLists.txt": [
{
"line": " HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
"line_number": 13,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
],
"archlinux/PKGBUILD": [
{
"line": "url=\"https://github.com/linuxdeepin/dtklog\"",
"line_number": 9,
"rule": "S35",
"reason": "Url link | 6fabe13a51"
}
]
} |
deepin pr auto review这个diff主要包含了对DTK日志库的构建系统的重大改进,让我详细分析一下:
这些改进整体上提升了项目的可维护性、安全性和可用性。建议在实施这些更改时,确保向后兼容性,并添加适当的测试来验证新功能。 |
|
Warning
详情 {
"export": {
"debian/rules": {
"a": [
"export QT_SELECT = qt5",
"export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
]
}
}
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, asterwyx, mhduiy 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 |
build control
(Qt6) versions
of PROJECT_VERSION
and DTK6
building
naming
Log: Updated build system to support both DTK5 and DTK6 versions
Influence:
DTK6
Dtk6Log)
Qt6Core)
refactor: 重构CMake构建系统以支持统一的DTK5/DTK6构建
Log: 更新构建系统以同时支持DTK5和DTK6版本
Influence: