I don't know why, but was able to resolve this issue by moving the mainwindow.ui
file to the same directory with the source files. So the structure will be the following:
MyProject
CMakeLists.txt
include
mainwindow.h
src
mainwindow.cpp
main.cpp
mainwindow.ui