Build attempts to write to the source directory (#3347)
Building with a read-only source directory results in failure due to two attempts to write into the source tree. Amend the CMakeLists.txt files to write the output into the binary directory.
Building with a read-only source directory results in failure due to two attempts to write into the source tree. Amend the CMakeLists.txt files to write the output into the binary directory.