I guess OP want to automate some of the tedious project set-up process, right?
To workaround without the script (because I lack knowledge how to script it), I use Visual Studio's
property sheet (.prop).
For me, .prop is easier to code than cmake script, e.g. here is how to set the working directory :-
Code: Select all
<PropertyGroup>
<LocalDebuggerCommand>SomePath\$(Configuration)\$(ProjectName).exe</LocalDebuggerCommand>
<LocalDebuggerWorkingDirectory>SomePath\$(Configuration)</LocalDebuggerWorkingDirectory>
....
Another great thing is that Property sheet can be also inside
another property sheet.
(reference:
https://stackoverflow.com/questions/167 ... rty-sheets)
This solution is Visual-specific though and it is hard to refactor (notepad++ find/replace is a workaround), and it is very far from what you asked.