[CMake] installing pdb files

Randy Hancock randy.hancock at gmail.com
Thu Dec 3 17:20:27 EST 2009


I fought with trying to get pdb files copied to a specific location during
the install step of my build. I finally have something working and this is
what I've come up with:

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/project_name.pdb
DESTINATION ${SYMBOLS_DIR})

where SYMBOLS_DIR is set to something like:
set(SYMBOLS_DIR "${CMAKE_SOURCE_DIR}/dist/symbols")

The tricky thing was getting the "Debug"/"Release" variable to work.
Apparently the secret spell is to use \${CMAKE_INSTALL_CONFIG_NAME}. I
presume the backslash is for delaying evaluation of the variable until the
install step is actually run. The other weird thing is that the
variable CMAKE_INSTALL_CONFIG_NAME isn't documented in --help-full and isn't
in the --help-variable-list list.

So I have a few questions:

1) Is there a better way to do what I'm doing?
2) Is CMAKE_INSTALL_CONFIG_NAME deprecated? If so, what is the alternative?
If not, where is the documentation?

Thanks,
Randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091203/a785df56/attachment.htm>


More information about the CMake mailing list