Exporting new SVN_REVISION_HIGHEST for projects with multiple svn modules

Objective: Be able to know whats the highest svn revision among all the svn modules contained in the project. The var name is SVN_REVISION_HIGHEST
Motivation: We need to name the final release files using the svn revision. The problem arises when the build was triggered by a change in one of the libraries. We had to find a way to list all the svn revisions for our project and choose the highest one. 
Cons: If a project is located in different svn repositories, then there's no point in comparing their revisions. This wouldn't be an issue but the SVN_REVISION_HIGHEST wouldn't be used.