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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to