Skip to content

Copy Qt pdb files to the build folder when present - #14502

Merged
magnesj merged 1 commit into
OPM:devfrom
magnesj:copy-qt-pdb-files
Aug 10, 2026
Merged

Copy Qt pdb files to the build folder when present#14502
magnesj merged 1 commit into
OPM:devfrom
magnesj:copy-qt-pdb-files

Conversation

@magnesj

@magnesj magnesj commented Aug 10, 2026

Copy link
Copy Markdown
Member

Qt is distributed both with and without pdb files. When they are present, copy them next to the Qt dlls in the build folder, so symbols are available when debugging into Qt.

  • ApplicationExeCode: pass --pdb to windeployqt for the configurations built with debug information (Debug and RelWithDebInfo). The install step uses RUNTIME_DEPENDENCIES, which resolves dlls only, so the pdb files are not added to the installer.
  • AppFwk test applications and unit tests: copy the pdb file matching each Qt dll. $<TARGET_PDB_FILE:...> is not available for imported targets, and cmake -E copy_if_different fails on a missing source file, so the copy is done by a small helper script, Fwk/AppFwk/cmake/CopyPdbIfExists.cmake, that derives the pdb name from the dll and skips the copy if the file is not present.

Qt is distributed both with and without pdb files. When they are present,
copy them next to the Qt dlls so symbols are available when debugging.

Pass --pdb to windeployqt for the configurations built with debug
information, and copy the matching pdb file in the AppFwk test
applications and unit tests using a helper script that skips missing
files.
@magnesj
magnesj merged commit c9d118f into OPM:dev Aug 10, 2026
9 checks passed
@magnesj
magnesj deleted the copy-qt-pdb-files branch August 10, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant