Try using absolute paths for any files you reference, a relative path is fairly ambiguous when tools that use those paths could be running in different directories other than the source directory. This may require you to wire through variables like CMAKE_BINARY_DIR
as mentioned by @ben.boeckel in another forum discussion thread.