Rename cmake variables to better support sub-project build

find . -name \*.cmake -exec sed -i '' "s/CMAKE_BINARY_DIR/CMAKE_CURRENT_BINARY_DIR/g" {} \;
find . -name \*.cmake -exec sed -i '' "s/CMAKE_SOURCE_DIR/CMAKE_CURRENT_SOURCE_DIR/g" {} \;
find . -name \*.cmake -exec sed -i '' "s/CMAKE_PROJECT_NAME/PROJECT_NAME/g" {} \;

Warning : A global serach/replace was carried out and in some cases the use of
the replaced CMAKE var names may have been intentional. Incorrectly replaced
variables will be fixed as and when they are found during testing.
Fix location of generated header for subproject build