Skip to content

Commit c2d2dd1

Browse files
18202781743deepin-bot[bot]
authored andcommitted
fix: correct include path in pkg-config file
The pkg-config file was incorrectly specifying the include path as ${includedir}/dtk@DTK_VERSION_MAJOR@/DWidget. This path was too specific and did not match the actual header file installation structure. The change updates the Cflags to use the base ${includedir} directory, allowing the compiler to find the DtkWidget headers in their correct location. This fix ensures that projects using pkg-config to locate DtkWidget headers will find them properly without requiring manual include path adjustments. The incorrect path was causing compilation failures in dependent projects. Influence: 1. Test compilation of projects that depend on DtkWidget using pkg- config 2. Verify that include directives like #include <DWidget> work correctly 3. Check that both cmake and qmake projects can find DtkWidget headers 4. Test with different DTK versions to ensure version compatibility 5. Verify that existing projects don't break due to include path changes fix: 修正 pkg-config 文件中的头文件包含路径 pkg-config 文件之前错误地将包含路径指定为 ${includedir}/ dtk@DTK_VERSION_MAJOR@/DWidget。这个路径过于具体,与实际的头文件安装结构 不匹配。此次更改将 Cflags 更新为使用基础的 ${includedir} 目录,使编译器 能够在正确的位置找到 DtkWidget 头文件。 此修复确保使用 pkg-config 定位 DtkWidget 头文件的项目能够正确找到它们, 而无需手动调整包含路径。之前的错误路径导致依赖项目编译失败。 Influence: 1. 测试使用 pkg-config 依赖 DtkWidget 的项目的编译 2. 验证 #include <DWidget> 等包含指令能正常工作 3. 检查 cmake 和 qmake 项目都能正确找到 DtkWidget 头文件 4. 使用不同 DTK 版本测试以确保版本兼容性 5. 验证现有项目不会因包含路径更改而出现问题
1 parent 561141f commit c2d2dd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc/DtkWidget.pc.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ Name: Dtk@DTK_NAME_SUFFIX@Widget
77
Description: Deepin Tool Kit Widget library
88
Version: @DTK_VERSION@
99
Libs: -L${libdir} -ldtk@DTK_NAME_SUFFIX@widget
10-
Cflags: -I${includedir}/dtk@DTK_VERSION_MAJOR@/DWidget
10+
Cflags: -I${includedir}
1111
Requires: dtk@DTK_NAME_SUFFIX@core dtk@DTK_NAME_SUFFIX@gui Qt@QT_VERSION_MAJOR@Core Qt@QT_VERSION_MAJOR@Widgets Qt@QT_VERSION_MAJOR@DBus Qt@QT_VERSION_MAJOR@Network Qt@QT_VERSION_MAJOR@PrintSupport

0 commit comments

Comments
 (0)