In order to build KWin against KDE Frameworks 5, one needs to have a working frameworks setup. For this follow the steps outlined in Frameworks/Building.
Once frameworks is set up, kde-workspace can be compiled. At the time of this writing the development happens in branch frameworks-scratch of the kde-workspace git repository. Please note that at the time of this writing KWin compiles and links but is not yet functional as important parts are not yet ported.
To get KWin working properly on Frameworks there are many tasks to be solved. These tasks can be found in the KWin/Frameworks Trello board. If you want to work on a task please contact Martin Gräßlin (mgraesslin on IRC, email mgraesslin at kde dot org) to be added to the board and assign a task to yourself.
Please see KWin/Hacking for further information about the structure of KWin.