WITH CMake 2.8.4
FILE(GLOB FORMS "form/*.ui")
QT5_WRAP_UI(FORMS_UIC ${FORMS})
FILE(GLOB MOCS "inc/test.h")
QT5_WRAP_CPP(HEADERS_MOC ${MOCS})
FILE(GLOB RES "qrc/*.qrc")
QT5_ADD_RESOURCES(RES_RCC ${RES})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}
ADD_EXECUTABLE(gui ${FILES} ${HEADERS_MOC} ${FORMS_UIC} ${RES_RCC})