Repository navigation
fix: make Qt5 (mips64el) build link DTK5 and deepin-pdfium5 #463
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,11 +18,22 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release") | |
| set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro -Wl,-z,now") | ||
| endif() | ||
|
|
||
| # 查找Qt版本(需先于 PDF 引擎模块选择:Qt5 构建走 deepin-pdfium5) | ||
| find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) | ||
| message(">>> Found Qt version: ${QT_VERSION_MAJOR}") | ||
| set(QT_DESIRED_VERSION ${QT_VERSION_MAJOR}) | ||
|
|
||
| # PDF 引擎使用系统库 deepin-pdfium(pkg-config: deepin-pdfium), | ||
| # 不再内嵌 3rdparty 源码 | ||
| # 不再内嵌 3rdparty 源码。libdeepin-pdfium 与 libdeepin-pdfium5 分别 | ||
| # 基于 Qt6/Qt5 构建,C++ ABI 不兼容,必须按 Qt 版本选择对应变体 | ||
| if(QT_VERSION_MAJOR MATCHES 6) | ||
| set(DEEPIN_PDFIUM_MODULE deepin-pdfium) | ||
| else() | ||
| set(DEEPIN_PDFIUM_MODULE deepin-pdfium5) | ||
| endif() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟠 High · Qt5 qmake builds keep wrong PDF engine When a caller uses the documented qmake build with Qt5, Select Prompt for AI agentsIn `CMakeLists.txt` at line 33:
**Qt5 qmake builds keep wrong PDF engine**
When a caller uses the documented qmake build with Qt5, `reader/src.pri` still requests the Qt6 `deepin-pdfium` pkg-config module, so the documented Qt5 qmake build links an ABI-incompatible engine and fails with unresolved PDFium symbols.
Select `deepin-pdfium5` in the qmake configuration when building with Qt5, including for tests. |
||
| find_package(PkgConfig REQUIRED) | ||
| pkg_check_modules(DEEPIN_PDFIUM REQUIRED deepin-pdfium) | ||
| message(STATUS "Using system deepin-pdfium: ${DEEPIN_PDFIUM_VERSION}") | ||
| pkg_check_modules(DEEPIN_PDFIUM REQUIRED ${DEEPIN_PDFIUM_MODULE}) | ||
| message(STATUS "Using system deepin-pdfium: ${DEEPIN_PDFIUM_VERSION} (module: ${DEEPIN_PDFIUM_MODULE})") | ||
|
|
||
| # 设置C++标准 | ||
| set(CMAKE_CXX_STANDARD 17) | ||
|
|
@@ -173,11 +184,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake) | |
| # 引入翻译生成 | ||
| include(translation-generate) | ||
|
|
||
| # 查找Qt版本 | ||
| find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core) | ||
| message(">>> Found Qt version: ${QT_VERSION_MAJOR}") | ||
| set(QT_DESIRED_VERSION ${QT_VERSION_MAJOR}) | ||
|
|
||
| # 设置DTK版本 | ||
| if (QT_VERSION_MAJOR MATCHES 6) | ||
| set(DTK_VERSION_MAJOR 6) | ||
|
|
||
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.
🟡 Medium · Qt5 configuration stops with allowed dependencies
When a Qt5 build resolves its PDFium dependency to only
libdeepin-pdfium-dev, cMake'spkg_check_modulesrequiresdeepin-pdfium5, so configuration stops despite the permitted generic development package and the build never starts.Make the Qt5 pkg-config module requirement match the PDFium development package that Debian can provide for Qt5.
Also at
CMakeLists.txt:35.Prompt for AI agents