Ok. I have found the issue. Since QT5_WRAP_UI macro is delivered as part of Qt5Widget packacge it is necessery to make a call to find_package (Qt5Widget) before issuing QT5_WRAP_UI call. Ehh :D