From c487fb174861eec733c91d89ec4651a5466b10b8 Mon Sep 17 00:00:00 2001 From: yeshanshan Date: Thu, 5 Feb 2026 16:42:50 +0800 Subject: [PATCH] fix: restore dconfig_meta_files macro for DTK5 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Reverted the conditional logic in dtkcore.cmake to install DtkDConfigMacros.cmake for DTK5 builds 2. The macro `dconfig_meta_files` was removed in DTK6 but is still required for DTK5 compatibility 3. Changed condition from `if (NOT DTK5)` to `if (DTK5)` to ensure the deprecated macro file is installed when building for DTK5 4. This preserves backward compatibility for projects that rely on the `dconfig_meta_files` function in DTK5 environments Log: Restored compatibility with DTK5 projects using dconfig_meta_files macro Influence: 1. Test building with DTK5 enabled to verify DtkDConfigMacros.cmake is installed 2. Verify that the `dconfig_meta_files` function is available in DTK5 builds 3. Test building with DTK6 to ensure the deprecated macro is not installed 4. Check that existing DTK5 projects can successfully use the dconfig_meta_files macro 5. Verify CMake installation paths contain the correct macro files for each DTK version fix: 恢复 dconfig_meta_files 宏以支持 DTK5 兼容性 1. 在 dtkcore.cmake 中恢复条件逻辑,为 DTK5 构建安装 DtkDConfigMacros.cmake 2. `dconfig_meta_files` 宏在 DTK6 中被移除,但在 DTK5 环境中仍然需要 3. 将条件从 `if (NOT DTK5)` 改为 `if (DTK5)`,确保在构建 DTK5 时安装已弃 用的宏文件 4. 这为依赖 DTK5 环境中 `dconfig_meta_files` 函数的项目保留了向后兼容性 Log: 恢复与使用 dconfig_meta_files 宏的 DTK5 项目的兼容性 Influence: 1. 测试启用 DTK5 的构建,验证 DtkDConfigMacros.cmake 是否正确安装 2. 验证 `dconfig_meta_files` 函数在 DTK5 构建中是否可用 3. 测试使用 DTK6 构建,确保不安装已弃用的宏 4. 检查现有 DTK5 项目能否成功使用 dconfig_meta_files 宏 5. 验证 CMake 安装路径是否包含适用于各 DTK 版本的正确宏文件 --- dtkcore.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtkcore.cmake b/dtkcore.cmake index 4a3f8023..6a8b285d 100644 --- a/dtkcore.cmake +++ b/dtkcore.cmake @@ -94,7 +94,7 @@ install(FILES cmake/DtkTools/DtkDBusMacros.cmake install(FILES ${CMAKE_SOURCE_DIR}/cmake/DtkTools/DtkDConfigMacros.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Dtk${DTK_NAME_SUFFIX}Tools") -if (NOT DTK5) +if (DTK5) set(DCONFIG_DEPRECATED_FUNCS [=[ # deprecated since dtk6 function(dconfig_meta_files)