[CMake] Packaging debug symbol files on Windows

Nils Gladitz nilsgladitz at gmail.com
Mon Jul 27 09:12:07 EDT 2015


On 07/27/2015 02:25 PM, Andreas Pakulat wrote:
> Hi,
>
> I'm trying to generate a zip file (on Windows) for a shared library
> including the generated debug symbols in pdb files with CPack.
> Unfortunately CPack does not seem to pick up the pdb files all by itself
> and after cross-reading the cpack docs in the cmake wiki I didn't see
> any switch to enable such behavior.
>
> Did somebody already do this and if so how?

What gets installed is decided by install() commands in your project 
rather than by CPack.

You can use the $<TARGET_PDB_FILE:tgt> [1] generator expression to 
install pdb files.

e.g. install(FILES $<TARGET_PDB_FILE:my_target> DESTINATION bin)

Nils

[1] 
http://www.cmake.org/cmake/help/v3.3/manual/cmake-generator-expressions.7.html


More information about the CMake mailing list