Skip to content

Commit 5809ac2

Browse files
caixr23deepin-bot[bot]
authored andcommitted
chore: update cmake minimum version to 3.23
Updated the CMake minimum required version from 3.18 to 3.23 in the DDE Control Center plugin macros. This change was necessary because the qt_add_qml_module function used in the build process requires features available in CMake 3.23 or later. Also added cmake_policy(SET CMP0071 NEW) to ensure proper handling of imported targets. The update ensures compatibility with Qt's QML module system and provides better support for modern CMake features. The previous minimum version 3.18 was insufficient for the advanced QML module functionality being utilized. Influence: 1. Verify CMake configuration succeeds with version 3.23+ 2. Test plugin builds with updated CMake requirements 3. Check that qt_add_qml_module functions correctly 4. Validate that CMP0071 policy setting doesn't break existing builds 5. Test with both older and newer CMake versions to ensure compatibility chore: 更新 CMake 最低版本要求至 3.23 更新了 DDE 控制中心插件宏中的 CMake 最低版本要求,从 3.18 提升到 3.23。 此变更是必要的,因为构建过程中使用的 qt_add_qml_module 函数需要 CMake 3.23 或更高版本提供的功能。同时添加了 cmake_policy(SET CMP0071 NEW) 以确 保正确处理导入的目标。 此次更新确保与 Qt 的 QML 模块系统兼容,并为现代 CMake 功能提供更好支持。 之前的最低版本 3.18 无法满足正在使用的先进 QML 模块功能需求。 Influence: 1. 验证 CMake 配置在 3.23+ 版本下成功运行 2. 测试插件在更新后的 CMake 要求下正常构建 3. 检查 qt_add_qml_module 函数是否正确工作 4. 验证 CMP0071 策略设置不会破坏现有构建 5. 测试新旧 CMake 版本的兼容性
1 parent e24192d commit 5809ac2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

misc/DdeControlCenterPluginMacros.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
cmake_minimum_required(VERSION 3.23)
12
include(CMakeParseArguments)
23

34
function(dcc_to_capitalized_string input_string output_variable)
@@ -12,7 +13,6 @@ function(dcc_to_capitalized_string input_string output_variable)
1213
set(${output_variable} ${result} PARENT_SCOPE)
1314
endfunction()
1415

15-
1616
macro(dcc_build_plugin)
1717
set(oneValueArgs NAME TARGET QML_ROOT_DIR)
1818
set(multiValueArgs QML_FILES RESOURCE_FILES)
@@ -69,6 +69,7 @@ macro(dcc_build_plugin)
6969
endforeach(FILE_PATH)
7070
qt_policy(SET QTP0001 NEW)
7171
qt_policy(SET QTP0004 NEW)
72+
cmake_policy(SET CMP0071 NEW)
7273
qt_add_qml_module(${_config_NAME}_qml
7374
PLUGIN_TARGET ${_config_NAME}_qml
7475
URI ${_config_NAME}

0 commit comments

Comments
 (0)