Allow in-the tree build by replacing CMAKE_SOURCE_DIR with PROJECT_SOURCE_DIR, renaming the conflicting SRC_TINYXML and some EOL fixes.