cmake creates a makefile
No, I meant qmake. Check the Makefile from that to see if there are any ideas about what could be wrong with the cmake configuration.