Best way I have found is to add as a Database Reference
In the Add Reference Dialog you can add a reference to a dacpac and check the box at the bottom to "Suppress errors caused by unresolved references in the referenced project" which will ignore errors in the referenced project, so you don't have to worry about the dependency chain.
This will automatically add the SQLCMD variables and you should then be able to use them in the view.