presets: Allow configure presets to refer to the current binary directory via `${binaryDir}`
Presets let you use ${sourceDir}
to reference the source directory the current project. What I'd like is a corresponding ${binaryDir}
macro. Such a feature would allow for writing more terse and expressive presets that don't require changing code in multiple places whenever the name of the binary directory changes. It would let the follow configure preset:
{
"name": "default",
"binaryDir": "build",
"installDir": "build/install",
"cacheVariables": {
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${sourceDir}/build/bin"
}
}
get simplified to this:
{
"name": "default",
"binaryDir": "build",
"installDir": "${binaryDir}/install",
"cacheVariables": {
"CMAKE_RUNTIME_OUTPUT_DIRECTORY": "${binaryDir}/bin"
}
}
Edited by Chris Thrasher