[CMAKE] Fix problem with __RELFILE__ not working when compiler uses relative pathes
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 9 Dec 2018 16:51:50 +0000 (17:51 +0100)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Tue, 11 Dec 2018 20:50:58 +0000 (21:50 +0100)
commit3de04ccace7d0b501608b633ff2f02113728eb95
treea05e8cad79401fe5ee5de611d82eac51b073319d
parent05169a49875523473881171b37425f97e45a9f0c
[CMAKE] Fix problem with __RELFILE__ not working when compiler uses relative pathes

This usually happens when the build dir is a subdir of the source dir. It is now detected during runtime, using the length of the relative path from the build dir to the source dir as the length of the prefix to skip, if __FILE__ starts with a '.'.
Also fix the escaping of REACTOS_*_DIR defines. It was gracefully fixed up by CMake, but resulted in broken syntax highliting.

CORE-14839 #resolve
CMakeLists.txt