[CMake] get_target_property( LOCATION) and CMAKE_DEBUG_POSTFIX (aka: Installing PDB files)

Rolf Eike Beer eike at sf-mail.de
Mon Feb 7 15:28:45 EST 2011


> Dear all,
>
>   I am trying to retrieve the full path of a dll to be able to compute
> the full path of the associated pdb file. I thought I could simply use
> the get_target_property( LOCATION) API, however it fails to return the
> actual name of the TARGET, for instance the value of
> CMAKE_DEBUG_POSTFIX it not taken into account (using cmake 2.8.3).
>
>   Is there another API to retrieve the path to a dll file generated by
> cmake from its target name ?

We did this using the brute force attempt of guessing the possible
locations (with Debug/RelWithDebInfo/without) and using the one that
works.

What about an INSTALL(target DEBUG_SYMBOLS DESTINATION dbg). That could
sometime made working also with separated gcc debug symbols or things like
that.

Eike


More information about the CMake mailing list