CMake subproject support; related to #1477
This changes CMAKE_SOURCE_DIR
to CMAKE_CURRENT_SOURCE_DIR
to allow graphviz to be built as a CMake subproject; see #1477 (closed).
I scanned for use of CMAKE_SOURCE_DIR
and CMAKE_BINARY_DIR
in all CMakeLists.txt
files and only found CMAKE_SOURCE_DIR
used in the top-level CMakeLists.txt
. I tested by building a simple project in the parent directory of the graphviz project root using this simple CMakeLists.txt config. The project built without obvious errors on Windows and the change does not seem to affect the normal build process.