<div>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:</div><div><br></div>install(FILES ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/project_name.pdb DESTINATION ${SYMBOLS_DIR})<div>
<br></div><div>where SYMBOLS_DIR is set to something like:</div><div>set(SYMBOLS_DIR "${CMAKE_SOURCE_DIR}/dist/symbols")</div><div><br></div><div>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.</div>
<div><br></div><div>So I have a few questions:</div><div><br></div><div>1) Is there a better way to do what I'm doing?</div><div>2) Is CMAKE_INSTALL_CONFIG_NAME deprecated? If so, what is the alternative? If not, where is the documentation?</div>
<div><br></div><div>Thanks,</div><div>Randy</div>