How to specify output directory for .o, .a and .exe with the cpp plugin?

Using the cpp plugin, I want to specify a different output location for each output file type coming from the build task. (i.e. I want the “.a” file to go in the “lib” folder under the project directory)

Reading the docs, I saw that the CppCompile task has a property called objectFileDir, but when I try to modify its value, it says the property doesn’t exist on task CppCompile. The same thing happened with the CreateStaticLibrary task and its outputFile property.

Thanks