Current directory during link step?

I’m having cross-crompiling issues with the armcc/armlink toolchain when I run armlink with our scatter file. The scatter file includes a header file from a relative path (has to work on developer machines and it works when building from the uVision IDE).
With CMake, the linker no longer finds that header file. When armlink is running, the current directory is different from the one when uVision runs the build.
The original scatter file uses #! armcc -E -I.. and then the #include path/to/file.h.
With CMake, I have to use #! armcc -E -I../<folder of my CMakeLists.txt>.

What is the “current directory” when CMake is running the link step? CMAKE_BIN_DIR? The scatter file mechanism is somewhat odd. Essentially, the linker takes all its inputs (the object files) from the build tree - except for a scatter file, which is located in the source tree and may include other files from the source tree.

I think it may be useful to generate that scatter file instead of assuming some static build tree layout. That way you can just generate it with an absolute path.

We hope to make building easier and won’t have to add complexity by creating generators. Well, we have control over the source and build trees. The existing IDE works relative to its project file. With CMake we could use CMAKE_SOURCE_DIR as the “anchor” since we define where the build tree lies relative to that.