I got the relative header paths to work with cloud compile.
My directory structure is like:
In main.cpp I have my include file paths as,
My makefile has particle compile photon src command
In this directory structure, the src(folder with .h and .cpp files) and makefile are at the same level. Also the particle cli appends the directory name between " and the first occurance of '/' in the #include ".." line.
So my include lines pasted above gets converted to:
If the makefile is in src folder the command would be
particle compile photon ../src
This compiled for both cloud and local builds.