Added dependencies for source installs and refactord similar parts into common include
Merge branch 'source_install'