QtCreator environment variable paths for custom build step
-
Hi everyone,
I'll like to make some custom build step, running an executable to modify the compiled files.
QtCreator (Windows) is set to generate the executables/libraries in
MSVC2010_32bit-Debug<subproject_name>\debug
MSVC2010_32bit-Release<subproject_name>\release
I need to use these paths as working directory.
The %{buildDir} enviroment variable is set to MSVC2010_32bit-Debug or MSVC2010_32bit-Release, given the current build configuration, and can be used to automatically set the first field of the working directory.
I write <subproject_name> manually, since not all the compiled outputs needs the custom build step.
Now, how to automatically add the last path field (debug or release) given the build mode? Is there an environment variable that I can use?Thanks!
MIX -
Hi, you can add or modify environment variables in the Projects mode (same place you switch Shadow build on/off), if you look at the bottom you have Build Environment, and it can be set differently for Release and Debug build mode.
Say for example for Debug build mode you add:
MYBUILDDIR=MSVC2010_32bit-Debug<subproject_name>\debug
and for Release build mode:
MYBUILDDIR=MSVC2010_32bit-Release<subproject_name>\release